Microsoft
Software
Hardware
Network
Question : Deleting A Row from a DataTable based on ID column
Hi All,
I have a DataTable stored within a Session variable like so..
DataTable myDt = new DataTable();
myDt = createTempDatesTable();
Session["TempDataTable"] = myDt;
The DataTable has a column called 'ID' which stored string values.
Please could anyone show me how to delete a row from my DataTable based on a value within the ID column.?
Answer : Deleting A Row from a DataTable based on ID column
If ID column is the primary column, then you can use like:
DataRow foundRow = myDt.Rows.Find("idValue");
foundRow.Delete();
Random Solutions
Adding extra characters to an output.
Where is the Refresh icon for IE 8?
Script to record whome i received and email and to whome i sent an email.
Check if cell has changed.
help crystal reports deployment package
SQL statement not working
how to vba programatically audit trail changes from capital to lower case alphabet letters
Delete domain from server and recreate domain
query to exclude multiple records
Copying graphs from Excel 2007 to word 2007 using VBA