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.
Hi,
I'm trying to create a UI to allow clients to control some basic column properties (colors, width, hide, and column order). The grid is a GridDataBoundGrid. At this point, I can handle the colors and header text by creating a GridBoundColumns collection fot the grid. Interstingly, width, and hide appear to be part of the Grid.Model, each as a seperate column indexed collection.
My assumption is that reordering columns is simply a matter of the order the are added to the GridBoundColumns. The concern is what does this do to the size mappings in the grid model? How do they get remapped to follow the new column order?
I've checked out the example at http://www.syncfusion.com/faq/winforms/search/764.asp but it appears to be specific for GridControls.
Am I barking up the wrong tree? It seems that I should just be able to create a new bound columns collection, set the properties for each column and apply the collection.
Any suggestions or examples would be greatly appreciated.
Thanks,
Doug Lind
Panther Systems
ADAdministrator Syncfusion Team September 19, 2003 03:19 PM UTC
If you use the this.gridDataBoundGrid1.Model.Cols.MoveRange method to move you columns (or allow you user to use the default drag column support), then the column sizes should move appropriately without further work.