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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to restrict the columns from being removed from the WinForms GridControl?

Platform: WinForms |
Control: GridControl

Deletion of column

To restrict the columns from being deleted, you can cancel the ColsRemoving event. In the given example, the deletion of columns is controlled through a WinForms Grid Control via the ColsRemoving event.


private void button1_Click_1(object sender, EventArgs e)
    //Removes a range of columns.
    this.gridControl1.Cols.RemoveRange(1, 1);
void gridControl1_ColsRemoving(object sender, GridRangeRemovingEventArgs e)
    if (checkBox1.Checked)
        //Disables deletion.
        e.Cancel = true;


Private Sub button1_Click_1(ByVal sender As Object, ByVal e As EventArgs)
  'Sets a Range for deleting column.
End Sub
Private Sub gridControl1_ColsRemoving(ByVal sender As Object, ByVal e As GridRangeRemovingEventArgs)
  If checkBox1.Checked Then
 'Disables deletion.
 e.Cancel = True
  End If
End Sub


In the following screenshot, to disable the column from being deleted, you can enable the check box. This restricts the column from being removed.

Restrict the deleted column in WinForms gridcontrol


C#: Deleting Column-C#

VB: Deleting Column-VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile