Click to See Complete Forum and Search --> : DataGrid Grouping / Sorting


BigJohnson
11-30-2006, 07:53 AM
Hi all
We're looking to move to ASP.NET from ASP and migrate our web-app over. However, we've come up against a major stumbling block already - grouping & sorting.

Whilst with VS-2005 can sort, it can't group therefore requiring code modification or the purchase of a component.

Essentially, what we require is the ability to group, the the ability to dynamically sort within the group. All of the examples we've seen so far loose the grouping once you sort.

Group1
-----item 1 --- detail 1
-----item 2 --- detail 2
Group2
-----item 3 --- detail 1
-----item 6 --- detail 2
Group3
-----item 7 --- detail 1
-----item 4 --- detail 2

apply DESC sort on Item column
Group1
-----item 2 --- detail 1
-----item 1 --- detail 2
Group2
-----item 6 --- detail 1
-----item 3 --- detail 2
Group3
-----item 7 --- detail 1
-----item 4 --- detail 2

Any assistance would be greatly appreciated.
Thanks
C.

A1ien51
11-30-2006, 09:27 AM
How are you filling up the datagrid?

Eric

BigJohnson
11-30-2006, 09:43 AM
Hi,
Using an SQL connection.
Thanks.
C.

A1ien51
11-30-2006, 10:11 AM
An easy solution would be to do another query for a sort and groupby attached. Not elegant!

Eric