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
How do I convert a Tab Separated Format .TXT file into an Excel 2007 CSV file?
change win.ini from boot with XP
VLAN setup on D-Link and Sonicwall
Php related question
Use javascript to get the href value of a clicked link
ASP.NET Membership and Profile Set Up
install PDFlib on FreeBSD
Is it possible to run rds 2008 r2 RemoteAPP web access in a Macintosh?
select within exec
HP z400 workstation crashes when I insall win 2003 R2 64 bit.