Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete from a datatable based on a value in a column

Status
Not open for further replies.

daughtd

Programmer
Sep 6, 2006
15
US
I have a datatable that is created on the fly. I need to be able to delete a row from it based on a value that is passed into a method as an argument.

sort of like:

private void deletion(string val){

then delete from the datatable where column 4 = val
}

Can this be done? If so how?
 
You can use the Rows.Remove method once you have found the relevant row


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top