dataset table row into an arraylist
I tried with this code but it doesn't help.
ArrayList arrayList = new ArrayList(); foreach
{
arrayList.Add (dr["Name"]);
}
I tried with this code but it doesn't help.
ArrayList arrayList = new ArrayList(); foreach
{
arrayList.Add (dr["Name"]);
}
In you code you are storing the value from the Name column in the ArrayList.
you can use the following code to add the compelete DataRow into an ArrayList
arrayList.Add( dr) ;
Simplest option..Just call a Select on the DataTable with a blank string for filter.
DataRow []arrDataRow = null; arrDataRow = db.dataSetUsers.Tables["Functions"].Select(""); |
This will give u an array of rows. (not an ArrayList)
Regards,
Vikram