472,126 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

Removing rows from the datatable

Hi,

I have a DataTable, which will have 2 Columns, one column holds Unique
values.

I will use DataTable.Select(Unique value) and Filter the Matching rows,

After filtering those rows I want to Delete those rows from the datatable.

Is it possible to remove the filtered rows and reflect back to the
DataTable?

TIA,

Gary
Nov 20 '05 #1
1 9711
you can use the rowfilter property

datatable.defaultView.rowfilter=" field = value"
dim i as integer
for i=0 to datatable.defaultview.count -1
datatable.defaultView(0).delete 'always delete the 0 row because
the rows are deleted and
next

datatable.defaultView.rowfilter = "true"
"Gary" <ms****@microsoft.com> wrote in message
news:Oa*************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a DataTable, which will have 2 Columns, one column holds Unique
values.

I will use DataTable.Select(Unique value) and Filter the Matching rows,

After filtering those rows I want to Delete those rows from the datatable.

Is it possible to remove the filtered rows and reflect back to the
DataTable?

TIA,

Gary

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by GaryB | last post: by
5 posts views Thread by Sparky Arbuckle | last post: by
5 posts views Thread by Geoff Jones | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.