Click to See Complete Forum and Search --> : Help with DataTable, DataSet, DataGridView


sai5002
June 18th, 2009, 01:06 PM
Hello all,

I'm using Visual Studio 2008, and I have a few DataGridViews being populated by Oracle stored procedures. I have a static method that adds a checkbox column to the DataSet populating the DGV:

public static void addCheck(DataSet ds)
{
DataColumn dc = new DataColumn("Select", System.Type.GetType("System.Boolean"));
ds.Tables[0].Columns.Add(dc);
}

I need to pick up on the selections in the checkboxes and store the values else where, so I can run them through another stored procedure, but I can't figure this part out. Any help would be much appreciated!

cjard
June 21st, 2009, 04:16 AM
Your post isn't particularly clear. I will assume that you have another tableadapter that interfaces with the destination for these rows.. Then just do:

thatTableAdapter.Update( myDataTable.Select("[select] = True"));

Note: I'd always advise NOT using reserved words as column names. Call your Select column something else