virtualgrid.Selections.Count =1 even when i am selecting multiple rows

Hi,


I want to check number of rows selected in virtual grid for which i am making use of property virtualgrid.Selections.Count which returns me number of rows selected.

When i am using control and selecting two rows i am receving count as 2 but when i am making use of shift key for selecting multiple row it show count as one do i am making use of right property to check selected rows.

Let me known what might be the cause.

Thanks
Yeshwant

1 Reply

RS Rajarajeswari S Syncfusion Team September 24, 2007 01:35 PM UTC

Hi,

Thanks for using Syncfusion products,

In Virtual Grid The selected rows will come under a rangelist . Please refer the following code snippet which illustrates this,

private void button1_Click(object sender, EventArgs e)
{

GridRangeInfoList rangeList = this.gridControl1.Selections.GetSelectedRows(true, false);
MessageBox.Show(rangeList[0].Bottom.ToString());
}

Here, rangeList[0].Bottom denotes the row-index of the Bottom-Right corner of the cell range

Please let me know if this helps you,

Regards,
S.Rajarajeswari

Loader.
Up arrow icon