The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I''m sure I''ve been able to reorder columns on a GridDataBoundGrid by dragging and dropping. Playing with the "DataBoundSortByDisplayMember" sample I cannot get this to work. Is it supported? What do I need to change in the sample to get this to work?
With GridGroupingControl is just works. I''m using SyncFusion 2.1.0.9.
Thanks,
Ben.
ADAdministrator Syncfusion Team August 19, 2004 10:47 AM UTC
That sample turned off column moving so a single click could sort the column instead of selecting it for moving. To turn it back on, you simply do step 5 below. But this may look strange to you as it sorts and selects for moving at the same time. One work around would be to use a double click to sort. But this requires more than just setting the SortBehavior property in the sample since the sample uses events to change the default sort behavior. Below are the steps I took to make that sample sort on a double click and select for moving on a single click.
1) In gridDataBoundGrid1_CellClick, set
bool VersionGreater1618 = true;
2) COmment out the OnCellClick override in the derived class, DataBoundGrid. (Or don''t use it).
3) Instead of subscribing to grid.CellClick, subscribe to grid.CellDoubleClick to sort on a double click. You can use the exact same handler, gridDataBoundGrid1_CellClick, as the CellClick used (with the change from #1).
4) change grid.SortBehavior property to none (instead of double click). This is in two places.
5) Add the GridSelectionFlags.Column flag to the this.gridDataBoundGrid1.AllowSelection property.