AD
Administrator
Syncfusion Team
May 23, 2005 05:12 PM UTC
The GridRangeInfo object does have helper methods like UnionRange that you can use to actually do the work, but there is nothing that I can think of in our library to help you decide whether you want to merge two ranges or not. You could handle the grid1.Model.SelectionChanged event. It has a e.Range with the new selection and an e.OldRanges with the old selections. You could iterate through the old selections of see if you can find a match for the new selection. If so, remove both the old selection and the new selection and replace it with a union of the 2. This would take a little coding, and you may have to check for recursive calls in SelectionChanged as the result of you adding a new selected range in the handler.