469,626 Members | 1,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

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 9633
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
By using this site, you agree to our Privacy Policy and Terms of Use.