cancel
Showing results for 
Search instead for 
Did you mean: 

GridFilling

Former Member
0 Kudos

Hi All,

I created a form with a grid .i need to fill the grid for that ,created a table ...

My code is

oNorForm.DataSources.DBDataSources.Add("@NOR_BRAND");

SAPbouiCOM.Matrix omatrix = (SAPbouiCOM.Matrix)oNorForm.Items.Item("4").Specific;

SAPbouiCOM.Columns oColumns;

SAPbouiCOM.Column oColumn;

oColumns = omatrix.Columns;

oColumn = omatrix.Columns.Item("Code");

oColumn.DataBind.SetBound(true, "@NOR_BRAND", "Code");

oColumn = omatrix.Columns.Item("Name");

oColumn.DataBind.SetBound(true, "@NOR_BRAND", "Name");

omatrix.LoadFromDataSource();

grid is not filling....

Can anyone help me.

Regards,

Susan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

that is not correct code.

' declare grid first

oGrid = oForm.Items.Item("4").Specific

oForm.DataSources.DataTables.Add("D_1")

oGrid.DataTable = oForm.DataSources.DataTables.Item("D_1")

oForm.DataSources.DataTables.Item(0).ExecuteQuery("select cardcode from ocrd")

oGrid.CollapseLevel = 0

oGrid.AutoResizeColumns()

try this.

Answers (0)