The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team April 17, 2007 06:11 PM UTC
What grid do you want to use?
GridControl, GridDataBoundGrid, or GridGroupingControl?
Here is some code for a GridGroupingControl. DataRow[] drs = dt.Select("[Col1] = 5");
DataTable newtable = new DataTable(); int c = 0; foreach (object o in drs[0].ItemArray) { newtable.Columns.Add(new DataColumn(string.Format("col{0}", c++), o.GetType())); } foreach(DataRow dr in drs) { newtable.Rows.Add(dr.ItemArray); } this.gridGroupingControl1.DataSource = newtable;
HVHrvoje VodaApril 20, 2007 10:29 PM UTC
This code is not good for me. I'm using GridDataBoundGrid.
ADAdministrator Syncfusion Team April 20, 2007 11:23 PM UTC
In the code above, changing this.gridGroupingControl1.DataSource = newtable;
to this.gridDataboundGrid1.DataSource = newtable;
should put the rows into a GridDataBoundGrid.
HVHrvoje VodaApril 21, 2007 09:49 AM UTC
I'm using it like that, but I get a grid with one empty row. No results.
ADAdministrator Syncfusion Team April 22, 2007 08:51 PM UTC
Here is a sample showing transferring a DataRow[] into a DataTable and setting it as the DataSource of a GridDataBoundGrid. What are you doing differently?