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

Custom Cell Types In GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

61543 May 29,2007 07:31 AM UTC May 30,2007 11:36 PM UTC Windows Forms 3
loading
Tags: GridControl
Tod Golding
Asked On May 29, 2007 07:31 AM UTC

I've been wrestling with the GGC control for several days now. I'm evaluating your product and was really impressed with the extensibility of its cell types. However, after download every example you have (including those from this forum), I still can't seem to make it work. I have gotten my cell to appear, but I cannot get it to function correctly (in terms of its rerepsentation of data in the model).

Ideally, I'd love to find an example the a) uses the GGC (not the databound grid); b) uses the data binding; c) binds a *custom celltype* to a custom list of business object, say IMyList; d) demonstrates what methods I need to override to properly render and update the model for this custom cell type; e) a GGC that support the "Add New" row and allows me to enter data for my custom cell.

In general, most of your example in this area use the databound grid (instead of the GGC) and most only use cell types for simple data types.

I've seen about 14 flavors of examples, but none that combine custom celltypes that are bound to custom data types. Each example seems to take a different approach to how it maintains the model and renders the component. And the documentation tells me little about wich methods must be overridden to properly render and maintain the model for a custom cell.

For what it's worth, I've gotten somewhat far with this. However, I've run into two stumbling blocks (that I know of). Each cell complains that I must implement IConvertable for my bound column (I'm hoping there's a way around this, since I cannot force my entity objects or lists to implement this interface). Also, when I add a new row, the contents of my custom column for each new row seems to be a shared reference (instead of a new instance of the cell). I say this because the contents of the new cell contain the same data for all cells. If I change one, they all change.

So...I know this is a long-winded post. Ultimately, if you could provide an example of a GGC that had a custom cell type that was a user control with a listbox in it, you'd probably resolve this issue for me. The only caveats would be that the listbox be populated from an IList type and the GGC should allow "add new" rows.

I've invested far too much time in this now and would love to find an answer that allowed me to get this off the ground, but I'm stuck. Any help would be greatly appreaciated.

haneefm [Syncfusion]
Replied On May 29, 2007 09:45 PM UTC

Hi Tod,

One way to do this would be to derive a custom cell type like the ones( \4.4.0.49\windows\Grid.Windows\Samples\CustomCellTypes\SliderCells). It requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell. Then to use your custom cell type in a grid, you need to register this celltype with the grid as shown in this sample.s\Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Windows\Samples\CustomCellTypes. Also the attached sample shows you "How to bind custom celltypes in a GroupingGrid?". It also uses the IBindinglist as datasource. Please try the sample and let me know if this helps.

Sample : CustomCellTypeSample

Best regards,
Haneef

Tod Golding
Replied On May 30, 2007 07:12 PM UTC

Thanks for you help. I've made more progress but I still can't get passed the one fundamental problem that landed me here. The list of objects I'm binding two has properties that are my own custom objects. When I edit the cell value for the cells that are bound to these custom types, the grid tells me I must implement ICovertible for the type that's bound to that cell. What do I need to do to prevent this error from occurring. The cell seems to allow me to populate its CellValue, but its throwing this IConvertible error. Should I just turn off valiation for the cell or is there some way to get this to work *without* requiring me to implement IConvertible (which I can't do, since the objects aren't owned by me)?




>Hi Tod,

One way to do this would be to derive a custom cell type like the ones( \4.4.0.49\windows\Grid.Windows\Samples\CustomCellTypes\SliderCells). It requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell. Then to use your custom cell type in a grid, you need to register this celltype with the grid as shown in this sample.s\Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Windows\Samples\CustomCellTypes. Also the attached sample shows you "How to bind custom celltypes in a GroupingGrid?". It also uses the IBindinglist as datasource. Please try the sample and let me know if this helps.

Sample : CustomCellTypeSample

Best regards,
Haneef

haneefm [Syncfusion]
Replied On May 30, 2007 11:36 PM UTC

Hi Tod,

Please follow the below forum thread.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=56622

Best regards,
Haneef

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

;