Custom In-Cell editor

When the user double clicks to enter in-cell editing, I do not want to use the "textbox" control to perform the edit. I want to choose the control to use at the time of the action. Is there an example of how to hook this custom in-cell editor to the grid model? If not, can you give a little sample of how to do this? Steve

1 Reply

AD Administrator Syncfusion Team April 11, 2005 04:27 PM UTC

If it is a single cell in a GridControl where you want to use a special control, you can set the style.CellType = "Control" and set style.Control to be an instance of your special control. MyControl myControl1 = new MyControl(); //.... gridControl1.Controls.Add(myControl1); //... gridControl1[2,2].CellType = "Control"; gridControl1[2,2].Control = myControl1; But if you want to do control sharing across multiple cells, then you need to derive your own CellModel class and CellRenderer class. Take a look at either this sample, \Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\CellTypes\CalendarCells or the SliderCells sample in the same folder. They derive cell type classes.

Loader.
Up arrow icon