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);
this.Controls.Add(columnChooser);
void columnChooser_Load(object sender, EventArgs e)
{
var value = this.sfDataGrid.Columns.ToList();
value.Remove(this.sfDataGrid.Columns[0]);
value.Remove(this.sfDataGrid.Columns[1]);
columnChooser.CheckedListBox.DataSource = value;
} |
Let us know whether this helps also if you need any further assistance on this.
Regards,
Jagadeesan