|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Remembering Sort Order on WinForms DataGridHello,
Is it possible to retrieve and set the sort order for a DataGrid control on a WinForm? I had a user request this functionality, and I can't seem to find a place to set and retrieve it from. Am I missing something, or is this something that is more difficult to do than is worth the time? Thanks in advance! Joseph Joseph,
Your surely miss something because it is easy to do. For that is the DataView or the DefaultView. Which is a view on a datatable. In that DataView or Defaultview there is a property Sort. You can set that while you can get the current value if a user changes that by clicking at the top of the grid. myDataTable.Defaultview.Sort = "MySecondColumn" I hope this helps, Cor Show quoteHide quote "Joseph Ferris" <joseph.fer***@gmail.com> schreef in bericht news:1143756587.526480.325030@t31g2000cwb.googlegroups.com... > Hello, > > Is it possible to retrieve and set the sort order for a DataGrid > control on a WinForm? I had a user request this functionality, and I > can't seem to find a place to set and retrieve it from. Am I missing > something, or is this something that is more difficult to do than is > worth the time? > > Thanks in advance! > > Joseph > Cor,
Yep. Missed the obvious. I knew that if I stepped away from it and asked, it would save me a lot of aggrevation in the long run. Thank you for helping me conserve what little hair I have left! Joseph
Re: Store multi-choice groupbox selection in a field
Form size ??? Do properties return byref or byval? select text in textbox DataGridView DataBinding PERFORMANCE QUESTION Serilization of custom object Viewing Word Docs in Tabs .vbprog not installed! VB 2005 - URGENT Check Mapped Drive is Connected |
|||||||||||||||||||||||