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
500 Points Available - corrupt Excel file when trying to "Save"
Loop through form controls and remove validation rule
What new threading features are now available in Visual Studio 2010?
create a demo database
Hardware Compatibility SATA SSD HDD
Ms Access query within query
How to share the same ModalPopupExtender and the popup panel by buttons within different UpdatePanel
Windows XP 64 bit fileserver and 32 bit client - any implications?
HP printer won't print, Dell printer will - This is after being attacked by TDSS
drupal view