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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Virtual Grid with renderer

Thread ID:





11481 Mar 8,2004 04:14 PM UTC Mar 9,2004 11:25 AM UTC WinForms 4
Tags: GridControl
Matthew Brohn
Asked On March 8, 2004 04:14 PM UTC

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 05:16 PM UTC

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 05:55 PM UTC

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 08:25 PM UTC

>>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 11:25 AM UTC

Thanks... thats it!!


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon