We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Custom GroupedColumns order

Thread ID:

Created:

Updated:

Platform:

Replies:

79693 Feb 20,2009 03:25 PM Feb 26,2009 03:44 AM Windows Forms 5
loading
Tags: Grouping
Stephane _
Asked On February 20, 2009 03:25 PM

Hi,

On the grid grouping. I can easely add a group by doing this:

_grdDistributions.TableDescriptor.GroupedColumns.Add("BookName")

This group will be ordered by BookName.

Is there a way to order it by BookOrder instead?


Nisha Arockiya A [Syncfusion]
Replied On February 23, 2009 07:09 AM


Hi Stephane,

Thanks for your interest in Syncfusion Products.

GroupedColumns property gets the collection of SortColumnDescriptor objects defining group by state of the table. A SortColumnDescriptor defines the sort order or grouping of a table. SortColumnDescriptors are managed by the SortColumnDescriptorCollection which is returned by the SortedColumns or GroupedColumns property of a TableDescriptor. So the Groupedcolumns are ordered ascending/descending according to the column which it is grouped.

Please let me know if this helps.

Regards,
Nisha.


Stephane _
Replied On February 23, 2009 10:26 AM

I'm a bit confused.

Here's a small example. As you can see the books are ordered by their description "Book1, Book2, Book3, Book4".
What I'm looking for is to see them ordered by their ordernumber "Book4, Book2, Book3, Book1".

If I understand, the column Description must have some code that will make it order it self by Order instead of Description.
What I don't understand is where to put this code.

(I've added a screenshot and the code)



SortGrouping_6c87d0ee.zip

Nisha Arockiya A [Syncfusion]
Replied On February 24, 2009 08:28 AM

Hi Stephane,

Thanks for the Update.

Please refer to the following browser sample that suites your requirement.

\My Documents\Syncfusion\EssentialStudio\7.1.0.20\Windows\Grid.Grouping.Windows\Samples\2.0\Sort\Sort By Display Member Demo

This sample demonstrates a solution for sorting by display members of the foreign-key combo boxes instead of their value members.

Let me know if this helps.

Regards,
Nisha.


Stephane _
Replied On February 25, 2009 10:38 AM

For people interested. I was able to find the solution based on this post.

http://www.syncfusion.com/support/forums/Message.aspx?MessageID=26206

I created a group based on the OrderId but created a custom categorizer that displays the Description instead.

Dim cd As Syncfusion.Grouping.SortColumnDescriptor

cd = New Syncfusion.Grouping.SortColumnDescriptor()
cd.Name = "Order"
cd.Categorizer = New CustomCategorizer("Description")
Me.GridControl1.TableDescriptor.GroupedColumns.Add(cd)


Nisha Arockiya A [Syncfusion]
Replied On February 26, 2009 03:44 AM

Hi Stephane,

Thanks for sharing information with us.

Please let us know any other concerns.

Regards,
Nisha.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;