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
AD
Administrator
Syncfusion Team
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.
AS
Anna Srinivasan
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.
>
>
AS
Anna Srinivasan
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.
>
>
AS
Anna Srinivasan
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
ST
stanleyj
Syncfusion Team
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
CV
Catinat Velmourougan
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.
>
>
CV
Catinat Velmourougan
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.
>
>
ST
stanleyj
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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
ST
stanleyj
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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
AD
Administrator
Syncfusion Team
January 18, 2006 02:28 PM UTC
hi,
solved the problem.
regards,
catinat