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 Type

Thread ID:

Created:

Updated:

Platform:

Replies:

62352 Jun 13,2007 10:32 AM Jun 13,2007 06:11 PM Windows Forms 1
loading
Tags: GridControl
Thanvir Hussain
Asked On June 13, 2007 10:32 AM

I need to have each of my cell in the grid to hold an additional property called MyModel. Since we are designing our application in MVC architecture, the MyModel will intract with each of the cell for getting and setting the data. I have used the GridCellModelBase and GridCellRendererBase classes and created a number of models but I have associated the MyModel for each cell through the GridStyleInfoCustomProperties class in my formload.
My question is.
Is there anyway I can create the MyModel directly inside each of my cell models. Also how do I serialize this customeproperty when I serialize the datagrid?

thanks in advance
thanvir

Saravanan A [Syncfusion]
Replied On June 13, 2007 06:11 PM

Hi Thanvir,

1, Is there anyway I can create the MyModel directly inside each of my cell models
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Please refer to the attached sample in this forum.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=39135

It has has two samples. First sample demonstrate a way to apply the CustomProperty to all the cells in the grid through the static constructor of the derived GridStyleInfoCustomProperties class. Second sample demostrate a way to have a custom property which is used by a derived CellModel and CellRenderer to customize the cell.

2, how do I serialize this customeproperty when I serialize the datagrid?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The sample refered above will also serialize the custom property automatically when you serialize the grid, since the custom property will get stored on the grid's internal memory itself.

Regards,
Saravanan

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.

;