We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

how to deselect row in Grid grouping control

I am using syncfusion grid grouping control.

I am using the following syntax to select the row.

this.gridGroupingControl1.Table.SelectedRecords.Add(this.gridGroupingControl1.Table.Records[indexRecToSelect]);

where "indexRecToSelect" is 1,2,3,......n is decided at runtime

In my case i want that when
"indexRecToSelect= 4" then 4th row should be selected...and when "indexRecToSelect =2" then 2nd row should be selected and previous selected row ie 4 should be deselected..

I will be v thankful if anyone could help me in selecting and deselecting rows when "indexRecToSelect" changes....

2 Replies

RA Rajagopal Syncfusion Team August 21, 2007 02:35 AM UTC

Hi Prabhjeet,

Thanks for your interest in Syncfusion Products.

Before you add any record to the SelectedRecords collection of the grid, check for the SelectedRecords in grid and call the SelectedRecords.Clear method.

this.gridGroupingControl1.Table.SelectedRecords.Clear();
Record rec = this.gridGroupingControl1.Table.Records[2];
this.gridGroupingControl1.Table.SelectedRecords.Add(rec);

Let me know if this helps.

Have a nice time.
Regards,
Rajagopal


AB abc August 21, 2007 05:14 AM UTC

hi Rajagopal,

thx a lot for ur reply.. that was really usefull...thx again..

Regards
Prabhjeet

>Hi Prabhjeet,

Thanks for your interest in Syncfusion Products.

Before you add any record to the SelectedRecords collection of the grid, check for the SelectedRecords in grid and call the SelectedRecords.Clear method.

this.gridGroupingControl1.Table.SelectedRecords.Clear();
Record rec = this.gridGroupingControl1.Table.Records[2];
this.gridGroupingControl1.Table.SelectedRecords.Add(rec);

Let me know if this helps.

Have a nice time.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon