range cells

hi, how can i know if a cell is part of a range?


1 Reply

AR Arulpriya Ramalingam Syncfusion Team March 9, 2020 11:40 AM UTC

Hi Dario,  
  
Greetings from Syncfusion.  
  
In order to check whether the cell is intersects with any range of a GridRangeInfo collection, the AnyRangeIntersects() method can be used and the GetRangesIntersecting() method can be used to get the specified range of the cell intersects. Please make use of the below code and sample.  
  
Example code  
  
'To check whether the current cell range is intersecting in any range of a RangeList.  
If list.AnyRangeIntersects(GridRangeInfo.Cell(gridControl1.CurrentCell.RowIndex, gridControl1.CurrentCell.ColIndex)) Then  
            'To get the range that intersects with the current cell.  
            MessageBox.Show(list.GetRangesIntersecting(GridRangeInfo.Cell(gridControl1.CurrentCell.RowIndex, gridControl1.CurrentCell.ColIndex)).ToString())  
End If  
  
  
Please get back to us, if you have any other queries.  
  
Regards,  
Arulpriya  


Loader.
Up arrow icon