We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridControl Control

Hi, I''m using GridControl, and I have some usercontrol that i want to show in certain column. There is CellType that called Control, how can I used ( without creating new CellTypeModel), and I prefer to ascribe my control to column in design time. Is it possible? Thanks in advance.

1 Reply

AD Administrator Syncfusion Team July 6, 2005 05:58 PM UTC

The Control celltype will need a new instance of your control for every cell that uses it. So, it would be difficult and probably not too efficient to put such a control in every cell of a column. (You would not be able to to do this just by setting grid.ColStyles[colIndex] to set the style on the column. You would have to loop through each cell in the column, and set grid[rowIndex, colIndex].CellType and grid[rowIndex, colIndex].Control for every cell.) If you need a UserControl to appear in many cells, it is better to derive a celltype that will share a single instance of the control across many cells. The \Essential Suite\Windows\Grid.Windows\Samples\CellTypes\CalendarCells is one of several samples that does something like this.

Loader.
Up arrow icon