Hi there
Another issue, this time with master-detail binding. First, let me explain the layout as seen in the screenshot below:
- If a node in the tree is being selected, the upper grid's data source is being changed programmatically (no binding).- the lower grid is part of a user control. This user control's data context is bound to the upper grid's active record. Thus, if I select another record in the upper grid, the lower grid displays related data.- If data was changed, the cells display an icon (marked with red circels, you might have to view the image in a new browser window if the forum crops them). Whether or not this icon is visible depends on a style that uses a converter.
The first image display a proper rendering. I changed the data source of the upper grid by selecting a tree item. This causes the lower grid to be updated and the styles are evaluated (converter is being invoked for each cell):
However, if the main grid's data source remains and i just select another record, the lower grid's DATA is being updated (marked by blue circle), but not the CellValuePresenter styles! As you can see, the indcators just stay there. Breakpoints in the debugger confirm that the converter is not being invoked again, although the grid's data source changed due to the binding:
I'm getting a little nervous here: I have a grid that renders wrong data all over the place and my customers expect a working version by next week, so any idea is greatly appreciated
Thanks for your advice
Philipp
I would try setting the lower grid's RecordContainerGenerationMode to "Virtualize" and its CellContainerGenerationMode="Preload". This should prevent record and cell presenters from being re-used in the bottom grid.
If this still doesn't work you can try a brute force approach by calling GetRecordsInView on the bottom grid. Then use the CellValuePresenter's static FromRecordAndField method to get specific CellValuePresenters for each record. From here you can get to any element in the tree of the cell.
Hi Joe
That fixed it - thanks! However, can I consider the current behaviour a bug (and your solution a workaround) that will be fixed with the 7.2 RTM release?
Edit:With that workaround, I ran in to the scrolling bug described in http://forums.infragistics.com/forums/t/2002.aspx. Besides that, the grid has become extremely sluggish and loading times have shot through the roof. Unfortunately, this is currently not a viable solution.
Cheers,
btw: This is another classic candidate for a built-in refresh method on a row/grid: the icons stay the same until the grid's data source is being replaced. This is something I really missing in quite a few scenarios (the CellValuePresenter.CoerceValue workaround that was posted by Joe Modica a while ago doesn't work here neither).