AD
Administrator
Syncfusion Team
August 15, 2004 02:46 PM UTC
Normally, you do not ''float'' a control over the current cell. Instead you use the cell control architecture based on a cellmodel class and a cellrenderer class to implement a cell control that you can share among all cells that you want to use it.
If you only want to see this control in one or two cells in the grid, you may be able to use the "Control" celltype. This is a little simpler than deriving your own cell control.
Here is a link to a forum thread that discusses both these options. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17597
If you want to try floating a control over the current cell, you can use the CurrentCellMoving and CurrentCellMoved events to catch the moving. You can access the row and column involved using the grid.CurrentCell.MoveToRowIndex/MoveFromRowIndex/MoveToColIndex/MoveFromColIndex values. You can get the rectangle (in grid coordinates) using grid.RangeInfoToRectangle(grid.CurrentCell.RangeInfo).