views:

314

answers:

3

Hi,

Does the gridview have any 'group by' functionality?

I need to display a table in the gridview, then allow for sorting on all the database table columns.

I also need to be able to 'group by' on some columns.

Any examples of this kind of functionality?

+2  A: 

Unfortunately the built-in gridview doesn't have grouping. Third party controls like the Telerik Grid have this functionality.

Keltex
A: 

Sorting in gridview will result in, effectively, a grouping. Say you have the data:

ID  Item
110 Pineapple
111 Orange
112 Apple
113 Pineapple

Sorting by the Item column would result in:

112 Apple
111 Orange
110 Pineapple
113 Pineapple

Are you looking for something else?

patjbs
+1  A: 

Take a look at the GridViewHelper code here: http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm, I've used it and found it works a treat

Rob
Yeup - I was very surprised (and pleased!) when I found it!
Rob