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.

Virtual Grid with renderer

Thread ID:

Created:

Updated:

Platform:

Replies:

11481 Mar 8,2004 11:14 AM Mar 9,2004 06:25 AM Windows Forms 4
loading
Tags: GridControl
Matthew Brohn
Asked On March 8, 2004 11:14 AM

I am using a virtual grid and have on column as a custom renderer. I have followed the "link" sample and currently it displays nicely and hottracks great. However whenever I click on it and try and save my value to e.style.tag, it crashes.. However, when the virtual method calls to get data I can set the value fine and the control reads it fin. It is only when the control trys to set this value.. Ideas? Note: I am setting an int to the tag.

Administrator [Syncfusion]
Replied On March 8, 2004 12:16 PM

In a virtual grid, the grid stores no values. So, when you say "save my value to e.style.tag" what do you mean? The only thing you can do is to set e.Style.Tag equal to something in QueryCellInfo. To do this, you either have to have dynamically created this tag value in QueryCellInfo, or you have to have stored it in some data storage object and retrieve it in QueryCellInfo. If you are using a storage object to save your tags, then you may need to save e.Style.Tag in SaveCellInfo if your program modified this Tag through some editing process. Another comment is that if you are using custom objects as Tags, then those object need to implement ICloneable if you want new objects created as you pass these Tags around through the style (as opposed to just a reference to a single object). Another comment is that if you want to be able to copy and paste tag objects, they need to be marked [Serializable] or implement ISerializable.

Matthew Brohn
Replied On March 8, 2004 12:55 PM

So in QueryCellInfo(..) I have an object that is given to the style.tag and then my control reads it and draws something custom. When the control changes it modifies the object at style.tag. At this point all is good.. The problem is now I would expect SaveCellInfo(..) to be called however it isn''t? And nO iI do not want to pass more information to the control than it needs to do its simple work.. Cheers, and thanks!!

Administrator [Syncfusion]
Replied On March 8, 2004 03:25 PM

>>When the control changes it modifies the object at style.tag. Is ''the control'' a custom cell control? If so, when it ''changes the style'', does it mark the currentcell as dirty by setting Grid.CurrentCell.IsModified to true? If not, the the renderer''s OnSaveCell is not called, and the grid does not know anything needs to be saved.

Matthew Brohn
Replied On March 9, 2004 06:25 AM

Thanks... thats it!!

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.

;