Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting the Data in mmDataGridView
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01250294
Message ID:
01250393
Views:
9
Rick,

>I have given MM.Net a couple of trys in the past, but I am willing to give it another try.
>
>One stopping point for me was I need to give my users the ability to double-click on the header of an mmDataGridView (on a Windows Form) and have the columns automatically sort (either ascending or descending).
>
>I want to stick with the native Window Controls and not purchase a third-party grid.
>
>Is that doable now-a-days?

Actually, this is a built-in feature of the Windows Forms DataGridView--however, rather than double-clicking the header, the user gesture is a single click of the header column you want to sort by. For everything to sync up properly, you should bind to a DataView rather than a DataTable. You can bind to a business object's DefaultView by setting the DataGridView's BindingSourceMember to TableName.DefaultView (where TableName is the name of the Table associated with the business object). For details check out the MM .NET Dev Guide topic "Data Binding Windows Forms Data Grids".

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform