MyControl box = new MyControl();
//set properties on MyCOntrol
box.BorderStyle = BorderStyle.None;
gridControl1.RowHeights[2] = 30;
gridControl1.ColWidths[2] = 200;
gridControl1[2,2].CellType = "Control";
gridControl1[2,2].Control = box;
this.Controls.Add(box);
But if you need to share your control among many cells, then you will have to derive a custom cell control. Ycan look for the custom cells in our samples folder. Here is a list from our samples that has custom cells
CellTypes\CalendarCells
CellTypes\PictureBoxCells
CellTypes\RadioButtonCells
CellTypes\SliderCells
CellTypes\XhtmlCells
In Depth\CellButtons
In Depth\DropDownFormAndUserControlSample
In Depth\DropdownGrid
In Depth\GridInCells
In Depth\VirtTreeGrid
Regarding the documentation, you can look for deriving a cell control section in our user guide.
EssentialGrid--->EssentialGridOverview --- > Deriving a cell control.
This will give you an overall idea how to derive a cell control. You should look for CellModel and CellRenderer classes and suitable methods to override depending upon your functionality.
>MyControl box = new MyControl();
>//set properties on MyCOntrol
> box.BorderStyle = BorderStyle.None;
>gridControl1.RowHeights[2] = 30;
>gridControl1.ColWidths[2] = 200;
>gridControl1[2,2].CellType = "Control";
>gridControl1[2,2].Control = box;
>this.Controls.Add(box);
>
>
>But if you need to share your control among many cells, then you will have to derive a custom cell control. Ycan look for the custom cells in our samples folder. Here is a list from our samples that has custom cells
>
>CellTypes\CalendarCells
>CellTypes\PictureBoxCells
>CellTypes\RadioButtonCells
>CellTypes\SliderCells
>CellTypes\XhtmlCells
>In Depth\CellButtons
>In Depth\DropDownFormAndUserControlSample
>In Depth\DropdownGrid
>In Depth\GridInCells
>In Depth\VirtTreeGrid
>
>Regarding the documentation, you can look for deriving a cell control section in our user guide.
>
>EssentialGrid--->EssentialGridOverview --- > Deriving a cell control.
>
>This will give you an overall idea how to derive a cell control. You should look for CellModel and CellRenderer classes and suitable methods to override depending upon your functionality.
private void gridControl1_CellClick(object sender, GridCellClickEventArgs e) { Point pt = new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y); pt = this.gridControl1.PointToScreen(pt); pt = myControl1.PointToClient(pt); Syncfusion.Drawing.ActiveXSnapshot.FakeLeftMouseClick(myControl1, pt); }Another thing you can do is to expose a method in your control that clicks its button, and then just call your method from the grid.CellClick event.