Save/Load grid columns

Can I select/re-order columns for your grid control at runtime?


1 Reply

MS Monisha Saravanan Syncfusion Team February 21, 2022 09:26 AM UTC

Hi Gibson, 

Greetings from Syncfusion support. 

We suggest you to use AllowReordering property of Grid to achieve your requirement. To reorder programmatically you can use ReorderColumnsAsync. Kindly refer the below code snippet. 

public void ReorderBtn() 
    { 
        this.DefaultGrid.ReorderColumns(new string[] {"CustomerName", "Freight"}, "OrderDate"); 
    } 

We have documented this topic, kindly refer the below documentation for more details, 


Similarly for the query related to selection, We can select the DataGrid rows either manually or programmatically. kindly refer the below documentation. 


Kindly get back to us if you have further queries. 

Regards, 
Monisha 


Loader.
Up arrow icon