This is a migrated thread and some comments may be shown as answers.

groups without sorting

3 Answers 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 27 Apr 2009, 10:07 AM
Hi,

how can I create groups which are not sorted rather the groups have the order of the datasource.

My data source is a IList of Objects. The objects have the properties: value and cavity.

Now I want to group the values by cavity. But the order of cavities should have the same order like they appear in the list.

e.g.:      value  cavity
            10         C
            11         C
            8           B
           10          B
            8           D
            9           D
            8           A
            7           A

the group order in GridView should be the same order in the list. group one = C, group two = B, group three = D, group four = A

Thank you for your help.

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 29 Apr 2009, 12:06 PM
Hi Markus,

Thank you for writing.

Currently RadGridView does not support custom groups sort. Fortunately, the described custom scenario could be easily implemented by adding invisible temp column and replacing the group with grouping by this temp column. To demonstrate this approach I have prepared a sample project that you can find as attachment to this message.

Do not hesitate to contact me again if you have any additional questions.

Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Markus
Top achievements
Rank 1
answered on 29 Apr 2009, 02:39 PM
With your proposed solution I created some code that works for me.

Thank you very much.

0
Martin Vasilev
Telerik team
answered on 01 May 2009, 11:59 AM
Hi Markus,

I am glad that the suggested approach suits your scenario. Do not hesitate to write me back if you need additional assistance.

Greetings,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Markus
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Markus
Top achievements
Rank 1
Share this question
or