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.

DoubleClick sort on DisplayMember

Thread ID:

Created:

Updated:

Platform:

Replies:

9342 Dec 15,2003 04:45 AM Jan 18,2006 09:28 AM Windows Forms 13
loading
Tags: GridControl
Markus Kraft
Asked On December 15, 2003 04:45 AM

Hi, one column im my databoundgrid is a combobox column using display- and valuemember. Type of the displaymember is string and type of the valuemember is integer. Value- and DisplayMember is provided by a second datatable. On doubleclick the colheader the valuemember will be sorted. How can i change the sortfunctionality to sort the displaymember? greetings markus

Administrator [Syncfusion]
Replied On December 15, 2003 07:18 AM

If you have the beta 2.0.1.0 samples, there is a sample at Syncfusion\Essential Suite\Grid\Samples\DataBound\DataBoundSortByDisplayMember that tries to address this problem. This sample is sort of hard coded for the specific NorthWind tables. Here is a little more general solution, but it does require that an extra column to be added to your grid''s DataSource, and probably makes sense only for grids with a thousand or so records. In the 2.0 GridGroupingControl, this problem goes away.

Anna Srinivasan
Replied On January 12, 2006 03:19 AM

>If you have the beta 2.0.1.0 samples, there is a sample at Syncfusion\Essential Suite\Grid\Samples\DataBound\DataBoundSortByDisplayMember that tries to address this problem. This sample is sort of hard coded for the specific NorthWind tables. > >Here is a little more general solution, but it does require that an extra column to be added to your grid''s DataSource, and probably makes sense only for grids with a thousand or so records. > >In the 2.0 GridGroupingControl, this problem goes away. > >

Anna Srinivasan
Replied On January 12, 2006 03:31 AM

Hi, I am using 3.301.0.0 GridGroupingControl.One of the column in my databoundgrid is a combobox column using display- and valuemember.On doubleclick of the ColumnHeader,the column gets sorted by the Valuemember. How can I change the sort functionality to sort the column by DisplayMember? Thanks, Anna. >If you have the beta 2.0.1.0 samples, there is a sample at Syncfusion\Essential Suite\Grid\Samples\DataBound\DataBoundSortByDisplayMember that tries to address this problem. This sample is sort of hard coded for the specific NorthWind tables. > >Here is a little more general solution, but it does require that an extra column to be added to your grid''s DataSource, and probably makes sense only for grids with a thousand or so records. > >In the 2.0 GridGroupingControl, this problem goes away. > >

stanleyj [Syncfusion]
Replied On January 12, 2006 07:02 AM

Hi Anna, Refer this thread http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=39048 and see if that helps. Best regards, Stanley

Anna Srinivasan
Replied On January 13, 2006 12:33 AM

Hi Stanley, Thanks for your help.But I would like to know if there is any other solution for this problem.Because I need to add sorting functionality on DisplayMember for few other drop down columns also in my DataGriGroupingControl.Please suggest any other general solution. Thanks, Anna. >Hi Anna, > >Refer this thread http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=39048 and see if that helps. > >Best regards, >Stanley

stanleyj [Syncfusion]
Replied On January 17, 2006 12:17 AM

Hi Anna, This is straight forward way of achieving sort by display member in GGC. Is the sample in the above mentioned thread not working for you? Regards, Stanley

Catinat Velmourougan
Replied On January 17, 2006 04:28 AM

hi, You have mentioned that, "In the 2.0 GridGroupingControl, this problem goes away." I use 3.0.1.0 version of the GridGroupingControl which is a higher version and still face the same problem. why? Has it been dropped from the latest version? regards, catinat >If you have the beta 2.0.1.0 samples, there is a sample at Syncfusion\Essential Suite\Grid\Samples\DataBound\DataBoundSortByDisplayMember that tries to address this problem. This sample is sort of hard coded for the specific NorthWind tables. > >Here is a little more general solution, but it does require that an extra column to be added to your grid''s DataSource, and probably makes sense only for grids with a thousand or so records. > >In the 2.0 GridGroupingControl, this problem goes away. > >

Catinat Velmourougan
Replied On January 17, 2006 04:30 AM

hi, You have mentioned that, "In the 2.0 GridGroupingControl, this problem goes away." I use 3.0.1.0 version of the GridGroupingControl which is a higher version and still face the same problem. why? Has it been dropped from the latest version? regards, catinat >If you have the beta 2.0.1.0 samples, there is a sample at Syncfusion\Essential Suite\Grid\Samples\DataBound\DataBoundSortByDisplayMember that tries to address this problem. This sample is sort of hard coded for the specific NorthWind tables. > >Here is a little more general solution, but it does require that an extra column to be added to your grid''s DataSource, and probably makes sense only for grids with a thousand or so records. > >In the 2.0 GridGroupingControl, this problem goes away. > >

stanleyj [Syncfusion]
Replied On January 17, 2006 07:13 AM

Hi Catinat, I am not sure what problem you are facing in 3.0.1.0 that you had not faced in 2.0. Can you explain in detail? Regards, Stanley

Administrator [Syncfusion]
Replied On January 17, 2006 07:17 AM

hi, The problem mentioned in this thread. When you sort on a drop down with value member and display member, it sort on value member and not on display member.Clay had given a solution to fix this and he had clearly said it will be fixed from 2.0. Kindly go through the previous messages to get an idea. regards, catinat >Hi Catinat, > >I am not sure what problem you are facing in 3.0.1.0 that you had not faced in 2.0. Can you explain in detail? > >Regards, >Stanley

stanleyj [Syncfusion]
Replied On January 17, 2006 08:11 AM

Hi Catinat, The right way you can achieve sort by display member in the GGC, is when, you use the ForeignKeyReference. Clay said that the problem go away because the ForeignKeyReference was introduced. I hope you are clear now. Let me know if you need any more information. Regards, Stanley

Administrator [Syncfusion]
Replied On January 18, 2006 12:29 AM

hi, Thanks for the clarification. I implemented the foreign key reference logic for GridGroupingControl and get the following error whenever I click on a column header,which has a drop down and uses foreign key reference: "System.FormatException: Input string was not in a correct format. at System.Number.ParseDecimal(String s, NumberStyles style, NumberFormatInfo info) at System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider) at System.Convert.ToDecimal(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType) at Syncfusion.Grouping.PrimaryKeySortedRecordsCollection.FindRecord(Object[] sortKeys) catched at Syncfusion.Grouping.PrimaryKeySortedRecordsCollection.FindRecord(Object[] sortKeys) in :line 0" Any ideas why this is happening? regards, catinat

Administrator [Syncfusion]
Replied On January 18, 2006 09:28 AM

hi, solved the problem. regards, catinat

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.

;