PC Review


Reply
Thread Tools Rate Thread

datagridview combo box sorting

 
 
chuck rudolph
Guest
Posts: n/a
 
      21st Dec 2007
It seems that a common approach would be to bind a table via a dataset to a
datagridview and then bind columns which contain codes to a combo box. The
code would be the value member; the display member of the combo box would be
a pretty name for the code and would come from another table in the dataset.
And this is easy enough to do.

The difficulty that i have is how to sort this column on the display member
value instead of the value member.

So did I miss something obvious?

My current thinking is to implement an object that also implements
IBindingList. Bind this to the datagridview and have it use the two
datatables as the backing store. In IBindingList.AppySort() this object would
be smart enough to use the display name for the column in question.

Other ideas are welcomed...Chuck
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView and sorting ReneMarxis Microsoft C# .NET 4 24th Nov 2007 04:57 PM
Sorting DataGridView Peter Morris Microsoft C# .NET 2 30th Sep 2007 12:12 PM
How to access combo box properties of DataGridView combo column Steve Marshall Microsoft Dot NET Framework Forms 2 26th Jun 2007 02:56 PM
DataGridView--after sorting Kevin S Gallagher Microsoft Dot NET Framework Forms 9 20th Mar 2007 04:21 PM
Sorting a Datagridview amit.vasu@gmail.com Microsoft C# .NET 3 17th May 2006 03:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:26 AM.