using datarow array as data source
-
In my windows application (C#) I need to use a datarow array as datasource for datagrid ,but I don't know how to bind it .Any help please.. Thank you.
-
In my windows application (C#) I need to use a datarow array as datasource for datagrid ,but I don't know how to bind it .Any help please.. Thank you.
-
dataGrid1.DataSource = new ArrayList( dataRowArray);
"What classes are you using ? You shouldn't call stuff if you have no idea what it does"
Christian Graus in the C# forumled mike
I have used a dataset and fired a query on it using select method which returns datarow array.This array I want to bind to datagrid. I tried your solution ,But what I saw in the datagrid was RowError,RowState,ItemArray,HasErrors,Table as columns which are not the columns in dataset. Any help on this?
-
I have used a dataset and fired a query on it using select method which returns datarow array.This array I want to bind to datagrid. I tried your solution ,But what I saw in the datagrid was RowError,RowState,ItemArray,HasErrors,Table as columns which are not the columns in dataset. Any help on this?
Prashant Gadhave wrote:
I have used a dataset and fired a query on it using select method which returns datarow array
For filtering rows of a DataTable you should use System.Data.DataView and set that as the DataGrid.DataSource.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does"
Christian Graus in the C# forumled mike
-
I have used a dataset and fired a query on it using select method which returns datarow array.This array I want to bind to datagrid. I tried your solution ,But what I saw in the datagrid was RowError,RowState,ItemArray,HasErrors,Table as columns which are not the columns in dataset. Any help on this?
Hi I understand u r problem and has a solution Use DATAVIEW DataView Dv = new DataView(DataTable); Dv.RowFilter = ""//Write the query and then assign datagrid.datasource=DV
vivek vitthalrao hedau