How remove rows from DataTable where column=value?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

I have a DataTable like

Id Code Value
1 TAB Inventory
2 TAB Marketing
3 GRP Pens
4 ICO Lot

I would like to remove all rows where Code=TAB since I'm done with that
part.

The reason I want to do this is so the DataTable (which will be in memory
fro the entire app session) will be as small as possible.

I could do it in a for loop but is there a better way?

Thanks,
Ron
 
I could do it in a for loop but is there a better way?

I don't think so. Loop it is...

Actually, even if you remove it from the DataTable, the DataSet might
still have hooks on it for change-tracking - something else to be
aware of...

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top