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

What happens when style.Tag changes

When the grid''s style.Tag changes (in QueryCellInfo), does this make the grid to refresh or something and hence send my usercontrol in this cell to loose focus? Is this how your code is setup because my control in this is loosing focus the minute the Tag changes?

3 Replies

AD Administrator Syncfusion Team September 8, 2004 05:40 PM UTC

What kind of objects are you putting into the style.Tag? The grid normally does not use style.Tag for anything (the one exception is the header cells for GridDataBoundGrid). So, normally, you control what goes into style.Tag. The default behavior for the grid is to clone style.Tag objects. Is this OK for your tag objects? Does cloning the object do something to your usercontrol? If you do not want your tag objects being cloned, then try setting these static properties. GridStyleInfoStore.TagProperty.IsCloneable = false; GridStyleInfoStore.TagProperty.IsDisposable = false; If this does not explain what you are seeing, then can you post a sample project showing the problem you are having?

MB Madhavi Balusu September 9, 2004 04:36 PM UTC

Hi Clay, I am storing integer values in the tag. It will be difficult for me to whip up a sample since our app is DB intensive, but I will do it as a last resort. Tell me, is there another way to store extra information in the cell (other than CellValue) some other way than the Tag? For a particular column, each cell has CellValues and "custom subValue". Is there a way to store this custom value in the cell members ( other than .Tag ), without me maintaining data structures? Everytime the user tabs aways from the field, I also need to store CellValue and this "Custom Value" into the DB.

AD Administrator Syncfusion Team September 9, 2004 04:50 PM UTC

If the extra value is a string, you can put it in the style.Description for any cell that is not a PushButton (as pushbutton cells use the Description).

Live Chat Icon For mobile
Up arrow icon