Home Forums WinForms controls Xceed Grid for WinForms May I add a label or button column as sepator? Reply To: May I add a label or button column as sepator?

User (Old forums)
Member
Post count: 23064

You can add an unbound column, in the designer or from code, like this:<code>Column colSeparator = new Column();
grid.Columns.Insert(col1.Index, colSeparator); // insert the column before column <i>col1</i></code>I think it’s a good idea to set some properties that make sure the separator column doesn’t do much, and isn’t too interactive:<code>colSeparator.CanBeGrouped = false;
colSeparator.CanBeSorted = false;
colSeparator.Width = width;
colSeparator.MinWidth = width;
colSeparator.MaxWidth = width;
colSeparator.Title = “”;</code>

Imported from legacy forums. Posted by Tommy (had 444 views)