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.

Custom cell types in GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

8573 Nov 12,2003 09:58 AM Nov 14,2003 06:55 AM Windows Forms 5
loading
Tags: GridControl
Trevor Moody
Asked On November 12, 2003 09:58 AM

I have recreated a custom cell type on a GridControl and would like to style it in QueryCellInfo (using e.Style if possible). How would you suggest is a good way of doing that?

Administrator [Syncfusion]
Replied On November 12, 2003 12:37 PM

So you have derived CellModel and CellRenderer classes to define your custom cell type. If so, then if you use grid.CellModels.Add to add a name and instance for your custom celltype to the grid's CellModels collection, you should be able to use your celltype anywhere just like any other celltype. So in QueryCellInfo, you would set e.Style.CellType = "myName" where myName is the string you registered in grid.CellModels.Add.

Administrator [Syncfusion]
Replied On November 12, 2003 12:37 PM

So you have derived CellModel and CellRenderer classes to define your custom cell type. If so, then if you use grid.CellModels.Add to add a name and instance for your custom celltype to the grid's CellModels collection, you should be able to use your celltype anywhere just like any other celltype. So in QueryCellInfo, you would set e.Style.CellType = "myName" where myName is the string you registered in grid.CellModels.Add.

Trevor Moody
Replied On November 13, 2003 01:18 AM

Yes, I have done that. However, for example for a progress bar, you will put e.Style.ProgressBar.(ProgressBarProperty) = progressbarproperty to set a property of the progressbar cell. How can I set a property of the custom cell in the same way if e.Style.CellType == "CustomCell"?

Administrator [Syncfusion]
Replied On November 13, 2003 05:30 PM

Take a look at the Essential Suite\Grid\Samples\CellTypes\SliderCells sample. It shows how to derive custom style properties. Look at the SliderStyleProperties class in the SliderCell.cs file.

Trevor Moody
Replied On November 14, 2003 06:55 AM

Thanks.

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.

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.

;