Hi Everybody,
I used the below code to merge rows which have same data on InitializeLayout event of WinGrid:
e.Layout.Override.MergedCellStyle = Infragistics.Win.UltraWinGrid.MergedCellStyle.Always;e.Layout.Override.MergedCellContentArea = Infragistics.Win.UltraWinGrid.MergedCellContentArea.VirtualRect;e.Layout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
I describe my question in below picture:
In above picture, I want col2 column merges rows which have same data, but it belong to data of col1 column.
Anybody could help me.
Many thanks!
Hi,
What you need to do is create a class which implements the IMergedCellEvaluator interface. Then you attach an instance of your IMergedCellEvaluator class to the MergedCellEvaluator property of Col2.
When you implement the interface, you will only return true when both Col1 and Col2 are the same value.
Hi Mike,
I have the same problem. Could you please show me how to do it step by step? Could you please provide the code in VB?
Thanks.
Hi Steve,
I whipped up a small sample VB project for you.