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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using my own usercontrol in a grid cell .

Thread ID:

Created:

Updated:

Platform:

Replies:

51679 Nov 10,2006 04:58 PM UTC Nov 10,2006 07:53 PM UTC Windows Forms 3
loading
Tags: GridControl
Adam K.
Asked On November 10, 2006 04:58 PM UTC

Using Syncfusion 3.3, DotNet 1.1

I have my own user control that i would like to show up in a cell when the user clicks on that cell. (just like the regular combobox behavior)

1. is this possible?
2. how do i go about associating my control into the grid
3. Is there any example code that shows this happening
4. Does this work with both usercontrols & custom controls?

NOTE: My userControl just derives from UserControl and is a combination of a dropdownbox and a button.

thks,
ak

Administrator [Syncfusion]
Replied On November 10, 2006 05:54 PM UTC

If you just want your UserControl to appear in a single cell of a GridControl, then you can try code like:

grid[2,3].CellType = "Control";
grid[2,3].Control = instanceOfYourUserControl;


If you want it to appear in many cells, then you can derive a cell control using your own CellModel and CellRender classes. Take a look at the CalendarCells sample that shows how to derive a celltype. There is alo a tutorial in teh UserGuide on deriving your own cell type.

Administrator [Syncfusion]
Replied On November 10, 2006 07:50 PM UTC

i want it to be all the controls in a column but i only want it to show when i click on the cell . . which option is more appropriate

thks,
ak

>If you just want your UserControl to appear in a single cell of a GridControl, then you can try code like:

grid[2,3].CellType = "Control";
grid[2,3].Control = instanceOfYourUserControl;


If you want it to appear in many cells, then you can derive a cell control using your own CellModel and CellRender classes. Take a look at the CalendarCells sample that shows how to derive a celltype. There is alo a tutorial in teh UserGuide on deriving your own cell type.

Administrator [Syncfusion]
Replied On November 10, 2006 07:53 PM UTC

also just to note, i am using a virtual grid . .

>i want it to be all the controls in a column but i only want it to show when i click on the cell . . which option is more appropriate

thks,
ak

>If you just want your UserControl to appear in a single cell of a GridControl, then you can try code like:

grid[2,3].CellType = "Control";
grid[2,3].Control = instanceOfYourUserControl;


If you want it to appear in many cells, then you can derive a cell control using your own CellModel and CellRender classes. Take a look at the CalendarCells sample that shows how to derive a celltype. There is alo a tutorial in teh UserGuide on deriving your own cell type.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;