Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2005

Tip: Looking for answers? Try searching our database.

How to get filtered/sorted data from DataGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 30 Sep 2005 21:59 GMT
Hi

I am implementing some printing in C# and I need to get the data for it. I
am using a datagrid. I can sort the data and filter it. I want to get a
datatable of only the data visible in the datagrid. The underlying dataview
holds all the records. If I have a dataview with 80 records in but the user
does a filter in the datagrid, I want to get only the 5 filtered records.

Can anyone help me with this one?

Tim
Pete Davis - 30 Sep 2005 23:10 GMT
If you're using the DataView for the filtering and sorting, why don't you
use the DataView to get the records for printing? It will have the
sorted/filtered data.

Just use DataView[rowIndex] to get the DataRowView for a row.

I assume you're using the DataView.RowFilter and DataView.Sort....

Pete

> Hi
>
[quoted text clipped - 8 lines]
>
> Tim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.