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
Understand Smart host and Exchange server
List Questions for the MS consultans
Server 2003 demoting PDC and Primary DNS.
Backup Exec System Recovery 2010
SQL convert time and date to just date
Word 2010 Styles / Paragraph Issues
Getting a "Server Unavailable" error when trying to download address book. Microsoft office
How update Yes/No filed in a table using a form
WP wysiwyg editor (for web page viewing) EXTRA BLANK LINES
Connect Oracle dataase through VB6