We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Require specific columns in column chooser

[1] Require specific columns in column chooser, in sfDataGrid some columns are fixed and some should be based on column chooser.

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team April 15, 2019 01:28 PM UTC

Hi Avinash, 

Thanks for using Syncfusion product. 

Your requirement can be achieved by removing the columns from CheckedListBox of the column chooser while loading. Please refer the below code snippet here two columns are removed from the list, so it does not display in column chooser. 

columnChooser = new Syncfusion.WinForms.DataGrid.Interactivity.ColumnChooser(sfDataGrid); 
columnChooser.Load += columnChooser_Load; 
columnChooser.Location = new Point(780, 120); 
void columnChooser_Load(object sender, EventArgs e) 
    var value = this.sfDataGrid.Columns.ToList(); 
    columnChooser.CheckedListBox.DataSource = value;  

Let us know whether this helps also if you need any further assistance on this. 


Live Chat Icon For mobile
Up arrow icon