Hi Esteban,
Your code it seems confused. On this line:
oGrid.Columns.Item("Activo").Type = SAPbouiCOM.BoGridColumnType.gct_CheckBox;
You set your column as CheckBox, but in the line below:
SAPbouiCOM.EditTextColumn gridEditCol; gridEditCol = oGrid.Columns.Item("Activo");
you try to put the the checkbox column on a EditTextColumn.
Another point in your code is that you are performing a select on OPYM table(object type 147), but you use object type 13 (invoice).
If I understood well, this is your goal:
f yes, use this code after your assign the datatable to the matrix
oGrid.Columns.Item("Activo").Type = SAPbouiCOM.BoGridColumnType.gct_CheckBox; oGrid.Columns.Item("Código").Type = SAPbouiCOM.BoGridColumnType.gct_EditText; SAPbouiCOM.EditTextColumn oEdit = (SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("Código"); oEdit.LinkedObjectType = "147";
Hope it helps.
Kind Regards,
Diego Lother
You need to cast the grid column
SAPbouiCOM.EditTextColumn gridEditCol; gridEditCol = (SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("Activo");
Add comment