Home Forums WinForms controls Xceed Grid for WinForms Adding Control via WYSIWYG view? Reply To: Adding Control via WYSIWYG view?

Odi [Xceed]
Spectator
Post count: 426

Hi Daren,

Assuming you mean assigning the controls you mentionned as cell editors, but in WYSIWYG fashion at design time, here would be the answer:

In the next release of the Grid (v2.6) coming out in a few months, you will be able to do this at design-time. In the current v2.5, you can do this only with code. We are fully embedding all our editor controls from Xceed Editors for .NET, plus some new ones like radio groups and such, into the Grid, and it will be usable at design-time in a WYSIWYG way.

Coming back to the current v2.5, to do this by code is quite easy. Here’s how you would do it to use one of the grid’s current built-in editors (say, TextBox) or any other control that implements the ICellEditor interface:

gridControl1.Columns[“YourColumn”].CellEditor = new GridTextBox();

You can also use any .NET control even if it does not implement ICellEditor, like this:

gridControl1.Columns[“YourColumn”].CellEditor = new CustomEditor( new YourTextBox(), “Text”, true );

Odi

Imported from legacy forums. Posted by Odi [Xceed] (had 3642 views)