I have attached a project which demonstrates a possible bug. I am using XamWebGrid 10.1 with ColumnLayout. In the child level I am using a Template Column with a HyperLinkButton. If you start scrolling down you will get an error.
I did see it and I added two properties to my class and changed the keys of the child level and everything looks good. Thanks for the insight on the recycling.
I'm not sure if you saw my last post, which went up right before yours,
However, like said before though, you've found a recycling issue...where you basically found the formula for identifying unique cells, which is causing them to appear in the differently layouts.
-SteveZ
Here is the updated project. I switched my columns at the parent level to be Template Columns and the error went away, however if you start scrolling down the grid some of the HyperLinkButton are not appearing at the 3rd Level. Below is a sample of how the data should appear on the screen.
-- Country---- State 1------ County 1 (this should be a link)------ County 2 (this should be a link)------ County 3 (this should be a link)---- State 2------ County 1 (this should be a link)------ County 2 (this should be a link)------ County 3 (this should be a link)
I was able to get past the error by switching all my columns to TemplateColumns, but there is another issue. I am using a HyperLinkButton, and if you look at the screen shot, if you start scrolling down the grid there are some that have no HyperLinkButton even though it is defined in the XAML. Is this a problem with virtualized rows?
Hi,
Thanks for the sample, it was very helpful.
Basically whats happening is, we use a generated key to determine how a cell should be recycled. However, you've apparently managed to figure out the combination of the key and break recycling :)
B/c you have a column with the same key and the same parent columnLayout key, the wrong control gets returned and the recycling basically shows the wrong cell.
I think i can adjust this to be more unique. As a workaround for now, i suppose you can use a UnboundColumn. Assuming you're not going to be using any data operations such as sorting on the column that should be an easy way around the issue, as you can use any key for an UnboundColumn.