Populate GridControl with DataSet

Hello Clay I write this in my program, i have a ADO .NET Dataset from Clientes (Customers) an i like populate the GridControl, but this not occur, because i see de grid but i not see de data of Clientes (Customers).: ------ Part of conection with de Database ---- string query = "SELECT * from Cliente"; System.Data.DataSet ds = DataHelper.ExecuteDataset(cnn, System.Data.CommandType.Text, query); ---------- End of conection DB --------------- this.grillaClientes.ResetVolatileData(); this.grillaClientes.BeginUpdate(); this.grillaClientes.RowCount = ds.Tables[0].Rows.Count; this.grillaClientes.ColCount = ds.Tables[0].Columns.Count; grillaClientes.Model.PopulateValues(GridRangeInfo.Cells(1, 1, this.grillaClientes.RowCount, this.grillaClientes.ColCount), ds); this.grillaClientes.EndUpdate(); this.Refresh(); Thank for your risponse Regards Liliana

2 Replies

AD Administrator Syncfusion Team December 5, 2004 08:13 PM UTC

Instead of grillaClientes.Model.PopulateValues(GridRangeInfo.Cells(1, 1, this.grillaClientes.RowCount, this.grillaClientes.ColCount), ds); try grillaClientes.Model.PopulateValues(GridRangeInfo.Cells(1, 1, this.grillaClientes.RowCount, this.grillaClientes.ColCount), ds.Tables[0]);


LF Liliana Faerman December 5, 2004 11:58 PM UTC

Thanks Clay!!!! Regards

Loader.
Up arrow icon