Current Selected Cell

Hi there, How could I check whether is there any selected row or cell ? thanks.

2 Replies

AD Administrator Syncfusion Team November 19, 2004 09:10 AM UTC

Having a current cell and having selections are two different things. Here a code snippet showing how you might check for these items. if(this.gridGroupingControl1.TableModel.CurrentCellInfo != null) Console.WriteLine(this.gridGroupingControl1.TableModel.CurrentCellInfo.ToString()); else Console.WriteLine("no currentcell"); if(this.gridGroupingControl1.TableModel.Selections.Ranges.Count > 0) Console.WriteLine("ranges: {0}",this.gridGroupingControl1.TableModel.Selections.Ranges.Count); else Console.WriteLine("no selections");


AD Administrator Syncfusion Team November 19, 2004 01:22 PM UTC

You can also check groupingGrid.Table.CurrentElement to get the current NestedTable, CaptionBar or Record element of the underlying row where the current cell is. And groupingGrid.Table.CurrentRecordManager.CurrentField to get the FieldDescriptor for the current column in the current record Stefan

Loader.
Up arrow icon