c# - How do I clear a column name in datagridview -


I am giving each column a name along with a right-click menu in the DataGrade view, with names along with all the names of names I am As each name is used, I have disabled the right-click menu item for each name because it has been selected so that the user can not give the two columns the same name. To do this, I'm using a simple statement if this column name exists:

  if (MyDataGridView.Column ["ColName"] = null] {ColName. Enabled = false; }   

However, if the user wants to re-name the column, then I am having trouble in the column "un-naming", as above, if the statement after my name The correct name for both names is column -name Is there a way to clear the name of the column, so that many names are associated with it in the column?

This should work:

  MyDataGridView Column ["ColName"]. Name = string Empty    

Comments