Print Page | Close Window

DataGridViewComboBoxColumn Sorting

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=319
Printed Date: 14-Sep-2025 at 10:18am


Topic: DataGridViewComboBoxColumn Sorting
Posted By: Darren
Subject: DataGridViewComboBoxColumn Sorting
Date Posted: 20-Jul-2007 at 8:14am

I have the DataGridView Binding Mananger which contains one standard string colum and  ComboBoxColumn, the values in the combo are sorted from the data model before the grid is populated , but when i click on the column header to sort that column by it textual value , it seems to sort it by the value member. Is there a way to sort it by its display name.

Do i do this in the ListConverter Properties?
 
 



Replies:
Posted By: owais,zahid
Date Posted: 22-Aug-2007 at 7:49am

its logical behaviour is to sort with value member. I don't think listConverter will be any helpful in this scenario. What i recommend i, you should try to catch the sorting event of this column. In this way you can sort the columns on your criteria.

I will try to find a reference implementation, i am sure you will find it on the internet.
 
God Bless



Print Page | Close Window