|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGridView in 2.0 Framework - SortingAll,
I am having a considerable amount of difficulty with what should be a very simple problem. I have a DataGridView that is bound to a collection of objects that displays (and edits) selected objects appropriately. However, I can find no way to activate sorting by column. I want to be able to do the normal thing: click on a column and have the rows sort (alphabetically) according to the contents of the selected column. According to the documentation, I should be able to set the column's sort mode to "Automatic" and the sort glyph should become available on the column. This, however, does not happen. The sort glyph does not appear and thus I cannot sort. Anybody know what the heck's going on here? Thanks Chris. Consider using a SortableBindingList implementation. Michael Weinhardt
wrote a good article on it for MSDN a while ago... http://msdn2.microsoft.com/en-us/library/ms993236.aspx Bill Check out the official DataGridView FAQ:
http://www.windowsforms.net/Samples/Go%20To%20Market/DataGridView/DataGridView%20FAQ.doc -- Show quoteHTH, Kevin Spencer Microsoft MVP Ministry of Software Development http://unclechutney.blogspot.com Any experience you can walk away from is a good one. "Chris Moore" <CMo***@gmail.com> wrote in message news:1163517672.635468.176850@b28g2000cwb.googlegroups.com... > All, > > I am having a considerable amount of difficulty with what should be a > very simple problem. I have a DataGridView that is bound to a > collection of objects that displays (and edits) selected objects > appropriately. However, I can find no way to activate sorting by > column. I want to be able to do the normal thing: click on a column and > have the rows sort (alphabetically) according to the contents of the > selected column. According to the documentation, I should be able to > set the column's sort mode to "Automatic" and the sort glyph should > become available on the column. This, however, does not happen. The > sort glyph does not appear and thus I cannot sort. Anybody know what > the heck's going on here? > > Thanks > Chris. > |
|||||||||||||||||||||||