Dear Sir,
Your UltraGrid does have an important feature of cell merging.However this merging behavior didn't consider previous column.I need to have to merging look like PivotTable in Excel.I know your competitor ComponentOne, who offers an dbgMergeRestricted behaviour which is extract what I wanted.Do you have this feature now or is going to have it next release.Because I'm going to decide which grid I'll choose for my application soon.
Thanks and Looking forward to your reply.
Jheri Chan @ Hong Kong
Hi Jheri,
It's hard to say, since I don't know what dbgMergeRestricted is or what it does.
If you can you explain exactly what you want to achieve, I can tell you if it's possible in the WinGrid and how to do it. :)
Hi Mike,
Thanks for your prompt reply. Let me quote the explaination from their forum.
dbgMergeRestricted: This is a new addition to the Merge property, which allows restricted type merging if the previous column is merged and its merge range is less than the current columns merge range.
I'll made a sample by Excel for you.
This merge type display the data in a more meaningful way. Particularly when there are many columns between col1 and col4, and Col1 and col4 cannot be seen in the same screen.
Thanks and Regards,
Jheri Chan
Okay, so the idea is that Col2 is only merged when Col 1 and Col2 have the same value. Makes sense.
The WinGrid doesn't have this functionality built-in, but this is something we could probably add in the future. You should Submit a feature request to Infragistics.
For right now, you could implement this using an IMergedCellEvaluator. There's a property on the column that allows you to pass in a class that implements this interface. Then you can handle a method on the interface and determine whether or not the cells should be merged, thus overriding the default behavior of merging everything with the same value. This gives you total control over the merging.
How do they determine the order or precedence here? Just by the visible order of the columns? If that's how it works, then I think this could be done with a pretty simple IMergedCellEvaluator that looks at the previous columns and you could use the same evaluator for every column.
Thank Mike,
I'll do a request and try out the IMergeCellEvalutor.