I am using the GridGroupingControl and have implemented the SelectedRecordsChanged event but the event seems to fire three times, first with e.Action = Added, then with e.Action = Reset and then again with e.Action = Added. I only want to respong to the Added action once.
Is this expected behaviour ?
HA
haneefm
Syncfusion Team
August 7, 2007 11:49 PM UTC
Hi James,
I am not sure of what be might be causing this strange behavior without a working sample. I have tested this issue in browser sample with Essentail studio V.4.x/5.x. But i was not able to reproduce the issue. The SelectedRecordsChanged event is raised once with e.Action equal Reset to indicate the old selection being removed, and then is raised again with e.Action equal Added to indicate the new selection being added. So in the event handler you can check the e.Action and perform the task based on that.
void gridGroupingControl1_SelectedRecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{
if (e.Action == SelectedRecordsChangedType.Added)
{
MessageBox.Show("Selection changed");
}
}
Is it possible for you to upload us a minimal sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.
Best regards,
Haneef
JE
James Evans
August 8, 2007 07:46 AM UTC
Hi Haneef,
Here is a test project that I have been using.
Could I also ask if you have had a chance to investigate the other issue that I have posted with subject "Refresh of the GridGroupControl after datasource has changed"
Thanks
James
GridGroup0.zip
JE
James Evans
August 8, 2007 07:57 AM UTC
this project has the resources in it
GridGroup1.zip
RR
Ramya R
Syncfusion Team
August 9, 2007 01:25 PM UTC
Hi James,
Thank you for the sample.
We have identified this issue of "SelectedRecordsChanged event fires thrice" to be a defect and we thank you for bringing this to our attention. To facilitate tracking the progress of the fix, and timely resolution, we request you to create an incident in our incident database Direct Trac. Our development team would be able to determine the fix and alert you with the service pack download details as soon as they are made available.
Please let me know if you have any queries.
Thanks & Regards,
Ramya.
JE
James Evans
August 9, 2007 04:33 PM UTC
This has now been lodded in Direct-Trac
AD
Administrator
Syncfusion Team
July 24, 2008 05:28 PM UTC
Any updates to this bug? This is a very nasty bug. In fact, the event is triggered way too many times. For instance, if you have 5 rows selected, then you use shift-click to select 10 rows, you will get SIXTEEN (16) events. 5 for removing each individual row, 1 for reset, and 10 for adding each individual row.
DE
Deepa
October 4, 2010 08:17 PM UTC
Has this been fixed?
Which version is the fix available?
Thanks,
Deepa.
NR
Nihar Ranjan Dalai
June 16, 2011 11:22 AM UTC
Any update on this issue?
Is there an event that could be fired just once even in case of multiselect of rows? For example, when I make a multiple selection in the grid by using shift key, I would like to get an event that is fired only once after all the selection has been made.
Thanks in advance,
Nihar.