PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

How to convert a DataView with RowFilter to a new DataTable?

 
 
Andreas Klemt
Guest
Posts: n/a
 
      1st Dec 2003
Hello,
I have this:

Dim dv As New DataView(GetUsersAsDataTable())
dv.RowFilter = "brithday >= 1970"

Dim dt As New DataTable
dt = **how to bring my rowfiltered DataView to a new DataTable** ?

When I do
dt = dv.Table
I get my original DataTable so that is unfortunatly not the solution.

Thanks for any help in advance!!
Andreas



 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      1st Dec 2003
Hi Andreas,

I don't think that there is a built-in way.
Do it manually in a loop, perhaps.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Andreas Klemt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> I have this:
>
> Dim dv As New DataView(GetUsersAsDataTable())
> dv.RowFilter = "brithday >= 1970"
>
> Dim dt As New DataTable
> dt = **how to bring my rowfiltered DataView to a new DataTable** ?
>
> When I do
> dt = dv.Table
> I get my original DataTable so that is unfortunatly not the solution.
>
> Thanks for any help in advance!!
> Andreas
>
>
>



 
Reply With Quote
 
 
 
 
General Protection Fault
Guest
Posts: n/a
 
      1st Dec 2003
Andreas Klemt wrote:

> Hello,
> I have this:
>
> Dim dv As New DataView(GetUsersAsDataTable())
> dv.RowFilter = "brithday >= 1970"
>
> Dim dt As New DataTable
> dt = **how to bring my rowfiltered DataView to a new DataTable** ?
>
> When I do
> dt = dv.Table
> I get my original DataTable so that is unfortunatly not the solution.


Why do you need it back to a DataTable? You can bind to the DataView
just as easily.

 
Reply With Quote
 
New Member
Join Date: Sep 2009
Posts: 1
 
      30th Sep 2009
use DataTable dt = dv.toTable()

that shall solve your problem
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a DataView with RowFilter to a new DataTable? Andreas Klemt Microsoft ASP .NET 2 1st Dec 2003 06:39 PM
RowFilter and Find of a DataView marlon Microsoft Dot NET Framework 4 26th Sep 2003 08:49 AM
RE: problems using DataView.RowFilter Scot Rose [MSFT] Microsoft ADO .NET 0 30th Jul 2003 12:13 PM
Re: problems using DataView.RowFilter Stephen Muecke Microsoft ADO .NET 2 28th Jul 2003 04:34 AM
Re: problems using DataView.RowFilter PeterK Microsoft ADO .NET 0 28th Jul 2003 04:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 PM.