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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DoubleClick sort on DisplayMember

Thread ID:

Created:

Updated:

Platform:

Replies:

9342 Dec 15,2003 09:45 AM UTC Jan 18,2006 02:28 PM UTC WinForms 13
loading
Tags: GridControl
Markus Kraft
Asked On December 15, 2003 09:45 AM UTC

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 12:18 PM UTC

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 08:19 AM UTC

>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 08:31 AM UTC

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 12:02 PM UTC

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 05:33 AM UTC

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 05:17 AM UTC

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 09:28 AM UTC

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 09:30 AM UTC

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 12:13 PM UTC

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 12:17 PM UTC

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 01:11 PM UTC

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 05:29 AM UTC

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 02:28 PM UTC

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.

Warning Icon 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.Close Icon

;