473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to get filtered/sorted data from DataGrid

Tim
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
Nov 17 '05 #1
1 1524
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

"Tim" <ti*@home.com> wrote in message
news:NF********************@news20.bellglobal.com. ..
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sam | last post by:
Hello group, The datagrid is sorted using a dataview. Can I get the sorted dataview or table from the datagrid or any other way. All I need to get is the sorted data. Here is my code and what I am...
2
by: vMike | last post by:
I have dataview which is stored in Cache for about 10 minutes. When a web user makes a selection the cached data is called from cache, sorted, filtered and bound to a datagrid. The cache is not...
3
by: sam | last post by:
Hello group, The datagrid is sorted using a dataview. Can I get the sorted dataview or table from the datagrid or any other way. All I need to get is the sorted data. Here is my code and what I am...
1
by: s26f84 | last post by:
Hey Guys Alot of articles and alot of stuff still no answer. Please help me on this one. I need to get data out of a filterred selected row !!! ... this is how my code looks like.... On...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.