473,405 Members | 2,261 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,405 software developers and data experts.

Sorting a filtering a generic list bound to a paged GridView?

Hello, I want to implement a generic list which will be used to
display 7 columns in a GridView. One should be able to sort, filter
and page each of the 7 columns. Ideally the filter should be
implemented simultaneously for multiple columns - but the data need
only be sorted by a single column at a time. Sorting should be both
ascending and descending.

I'm currently using a DataView but it's far too slow, because there
are a large number of rows. When full, there are about 2000 rows to
the DataView and 15 columns. None of the columns are particularly
long.

The filtering is done with 7 DropDownLists to which data is bound -
each of the dropdowns has a value and text display - for instance
ConsultantID, ConsultantName

The DataView looks like this:

TransactionID, ConsultantID, ConsultantName, ManagerID, ManagerName,
AssetClassCode, AssetClassName, ... etc.

The IDs are generally integers and the Codes - single or double
characters, only the Names are displayed in the GridView - the IDs and
Codes are there to speed up filtering.

I've seen some examples on the web.

Should I be following the methods that use delegates for the sorting?

Is FindAll() with a List<Tsuitable for all the filtering?

Am I better off using a BindingList<Trather than a List<T>
Feb 1 '07 #1
3 6605
Are you talking about GridView or DataGridView? VB or C#? WebForms or
Windows FOrms? .Net 2.0 or .Net 1.1?

Robin S.
------------------------------
"Harry Haller" <Ha***@Steppenwolf.comwrote in message
news:9g********************************@4ax.com...
Hello, I want to implement a generic list which will be used to
display 7 columns in a GridView. One should be able to sort, filter
and page each of the 7 columns. Ideally the filter should be
implemented simultaneously for multiple columns - but the data need
only be sorted by a single column at a time. Sorting should be both
ascending and descending.

I'm currently using a DataView but it's far too slow, because there
are a large number of rows. When full, there are about 2000 rows to
the DataView and 15 columns. None of the columns are particularly
long.

The filtering is done with 7 DropDownLists to which data is bound -
each of the dropdowns has a value and text display - for instance
ConsultantID, ConsultantName

The DataView looks like this:

TransactionID, ConsultantID, ConsultantName, ManagerID, ManagerName,
AssetClassCode, AssetClassName, ... etc.

The IDs are generally integers and the Codes - single or double
characters, only the Names are displayed in the GridView - the IDs and
Codes are there to speed up filtering.

I've seen some examples on the web.

Should I be following the methods that use delegates for the sorting?

Is FindAll() with a List<Tsuitable for all the filtering?

Am I better off using a BindingList<Trather than a List<T>

Feb 1 '07 #2
On Thu, 1 Feb 2007 00:59:34 -0800, "RobinS" <Ro****@NoSpam.yah.none>
wrote:
>Are you talking about GridView or DataGridView? VB or C#? WebForms or
Windows FOrms? .Net 2.0 or .Net 1.1?
GridView with ASP.NET 2.0

Even when I run my DataView version locally it's taking 15 seconds to
complete the page, much longer when it's run over the web.
>Robin S.
------------------------------
"Harry Haller" <Ha***@Steppenwolf.comwrote in message
news:9g********************************@4ax.com.. .
>Hello, I want to implement a generic list which will be used to
display 7 columns in a GridView. One should be able to sort, filter
and page each of the 7 columns. Ideally the filter should be
implemented simultaneously for multiple columns - but the data need
only be sorted by a single column at a time. Sorting should be both
ascending and descending.

I'm currently using a DataView but it's far too slow, because there
are a large number of rows. When full, there are about 2000 rows to
the DataView and 15 columns. None of the columns are particularly
long.

The filtering is done with 7 DropDownLists to which data is bound -
each of the dropdowns has a value and text display - for instance
ConsultantID, ConsultantName

The DataView looks like this:

TransactionID, ConsultantID, ConsultantName, ManagerID, ManagerName,
AssetClassCode, AssetClassName, ... etc.

The IDs are generally integers and the Codes - single or double
characters, only the Names are displayed in the GridView - the IDs and
Codes are there to speed up filtering.

I've seen some examples on the web.

Should I be following the methods that use delegates for the sorting?

Is FindAll() with a List<Tsuitable for all the filtering?

Am I better off using a BindingList<Trather than a List<T>
Feb 1 '07 #3
I don't do web stuff, I do windows forms. Brian Noyes wrote a Data Binding
book, and tells how to do sorting and filtering on a DataGridView in
WinForms on a list of business objects. If you think that would help you,
check out his book. He also has the sample code online at
http://softinsight.com/databindingbook. Check out Chapter 9, Customer
Business Objects.

He also has some info about web forms in his book, but since I don't do web
stuff, I didn't read it that closely.

Hope this helps.

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------
"mark4asp" <ma******@gmail.comwrote in message
news:i3********************************@4ax.com...
On Thu, 1 Feb 2007 00:59:34 -0800, "RobinS" <Ro****@NoSpam.yah.none>
wrote:
>>Are you talking about GridView or DataGridView? VB or C#? WebForms or
Windows FOrms? .Net 2.0 or .Net 1.1?

GridView with ASP.NET 2.0

Even when I run my DataView version locally it's taking 15 seconds to
complete the page, much longer when it's run over the web.
>>Robin S.
------------------------------
"Harry Haller" <Ha***@Steppenwolf.comwrote in message
news:9g********************************@4ax.com. ..
>>Hello, I want to implement a generic list which will be used to
display 7 columns in a GridView. One should be able to sort, filter
and page each of the 7 columns. Ideally the filter should be
implemented simultaneously for multiple columns - but the data need
only be sorted by a single column at a time. Sorting should be both
ascending and descending.

I'm currently using a DataView but it's far too slow, because there
are a large number of rows. When full, there are about 2000 rows to
the DataView and 15 columns. None of the columns are particularly
long.

The filtering is done with 7 DropDownLists to which data is bound -
each of the dropdowns has a value and text display - for instance
ConsultantID, ConsultantName

The DataView looks like this:

TransactionID, ConsultantID, ConsultantName, ManagerID, ManagerName,
AssetClassCode, AssetClassName, ... etc.

The IDs are generally integers and the Codes - single or double
characters, only the Names are displayed in the GridView - the IDs and
Codes are there to speed up filtering.

I've seen some examples on the web.

Should I be following the methods that use delegates for the sorting?

Is FindAll() with a List<Tsuitable for all the filtering?

Am I better off using a BindingList<Trather than a List<T>

Feb 1 '07 #4

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

Similar topics

0
by: Raghu Belur | last post by:
I have been playing around with the hands on labs from the PDC and am trying to figure out how to enable sorting of the resulting output when the GridView control on the page is bound to an...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
3
by: Carlos | last post by:
Hi all, I currently have a Gridview that doess sorting correctly using several fields. However, I do have a checkbox field that when it is checked I do not know how to make its value to persist...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
4
by: kurt sune | last post by:
I have a an aspx page with a gridview. The gridview is data bound to a generic list of custom classes. The gridview's DataSource is thus not set. Now I want to add sorting to it. So I create...
3
by: =?Utf-8?B?YmJkb2J1ZGR5?= | last post by:
I have a question that maybe somebody can help me out. I have a gridview that is bound to a sqltable, and I have created two template columns. I am having problems getting the sorting to work....
0
by: allan.s.palmer | last post by:
Hi everyone, I have a generic List<that is bound to a grid view and I want to enable sorting. I have enabled sorting on the GridView, and have set my sort expressions for the each property of...
2
by: Aamir Ghanchi | last post by:
hi, I have a gridview which is bound to ObjectDataSource which in turn reads from a business objects methods for custom paged data. When PageIndex is set to any value other than 0 and one of the...
1
by: John A Grandy | last post by:
In regard to a GridView that must support searching, filtering, sorting, and paging ... There is a tradeoff in performing the sorting and paging in the database versus to creating a CLR sort...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.