Hi
I have a WinGrid with a column that is set to MergeCellEvaluationType = MergeSameText and MergedCellStyle = Always. This works just fine, except whenever the underlying data changes, the changed data is not reflected in the Grid.
e.g.
1. Create three rows, with cells in Column B all set to "Isaac".
2. Grid correctly merges all cells in Column B into one.
3. Change Row one, Column B = "Joe Bloggs".
4. Grid still shows in merged cell of "Isaac".
Any ideas?
Thanks
Isaac
Hi Isaac,
What's your data source? It may not be sending notifications that the data has changed.
Or, it's possible that the grid just isn't re-merging the cells when it gets the notification, in which case this could be a bug.
Aha! Absolutely right. I'm using a DataSet for binding, which doesn't support (afaik) INotifyPropertyChanged. So I've manually called ResetCurrentItem on my BindingSource which fixes the problem - to a point.
The grid tries to redraw the merge cells, but leaves the "old" cell there as well, on top of the new one! The only way to fix this is to resize/ move the window, which seems to force the Grid to re-draw itself, and thus clearing the "old" cell.
So, the binding part works now, but it's uncovered something else in the redraw mechanism which seems to be flawed. Is there a way I can "force" the Grid to re-draw itself? i've tried calling the Invalidate and Refresh methods but neither do the trick.