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.