BobyIsProgress
Member
Hello,
I'm currently working to migrate from OE10 to OE12.8 and I have to rework every program that have OCX. I so choose to replace browse by DataGridView .
I manually hide the column I don't want to DISPLAY instead of keyeding the one I want like in a Browse WIDGET.
Am I doing right or is there another way ?
Best Regards,
I'm currently working to migrate from OE10 to OE12.8 and I have to rework every program that have OCX. I so choose to replace browse by DataGridView .
CLASS myClass INHERITS Form:
DEFINE PRIVATE VARIABLE myDG AS System.Windows.Forms.DataGridView NO-UNDO.
DEFINE BUFFER myDG-BUFFER FOR MYTABLE .
DEFINE QUERY myQUERIE FOR myDG-BUFFER SCROLLING .
DEFINE VARIABLE myBS AS Progress.Data.BindingSource NO-UNDO.
CONSTRUCTOR PUBLIC myClass:
InitializeComponent().
InitializeDataGridView() .
END CONSTRUCTOR .
METHOD PUBLIC VOID InitializeDataGridView( ):
/* Initialisation Spé Vignal */
QUERY myQUERIE:QUERY-PREPARE ("FOR EACH myDG-BUFFER NO-LOCK") .
QUERY myQUERIE:QUERY-OPEN() .
myBS = NEW Progress.Data.BindingSource() .
myBS:HANDLE = QUERY myQUERIE:HANDLE .
myBS:AllowEdit = FALSE .
myBS:AllowNew = FALSE .
myBS:AllowRemove = FALSE .
myDGataSource = myBS .
myDG:Columns["field2"]:visible = FALSE .
RETURN.
END METHOD.
END CLASS.
I manually hide the column I don't want to DISPLAY instead of keyeding the one I want like in a Browse WIDGET.
Am I doing right or is there another way ?
Best Regards,
Last edited by a moderator: