Hi
Using below code i want to get data in Repeater/Gridview in c#
biuan.com/DataBrowser/Recordset/
C#
SAPbobsCOM.SBObob obj = _oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
SAPbobsCOM.Recordset rs = _oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
rs = obj.GetBPList(SAPbobsCOM.BoCardTypes.cCustomer);Thanks

Amit MohantyRank #112 · 20K reputationPosted Dec 30, 2023, 2:07 AM EST
Assuming rs contains data to bind Repeater/Gridview.
DataTable dataTable = new DataTable(); for (int i = 0; i < rs.Fields.Count; i++) { // Assuming all fields are of type string dataTable.Columns.Add(rs.Fields.Item(i).Name, typeof(string)); } while (!rs.EoF) { DataRow newRow = dataTable.NewRow(); for (int i = 0; i < rs.Fields.Count; i++) { // Assuming all fields are of type string newRow[i] = rs.Fields.Item(i).Value.ToString(); } dataTable.Rows.Add(newRow); rs.MoveNext(); } Repeater1.DataSource = dataTable; Repeater1.DataBind(); // Alternatively, you can bind it to a GridView // GridView1.DataSource = dataTable; // GridView1.DataBind();