cancel
Showing results for 
Search instead for 
Did you mean: 

Fill Grid

Former Member
0 Kudos

How to fill Grid using Recordset?

Please help

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use this,

oGr.DataTable.ExecuteQuery("SELECT * FROM OHEM")

Vasu Natari.

Nussi
Active Contributor
0 Kudos

Hi,

here's a c# sample


oForm.DataSources.DataTables.Add("MyDataTable");
 
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).DataTable = oForm.DataSources.DataTables.Item("MyDataTable");
 
oForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT Field FROM [dbname].dbo.TABLE");
 
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).CollapseLevel = 1;
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).AutoResizeColumns();

just edit the SELECT and correct the "grid" name

lg David