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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedRecordsChanged event fires twice with e.Action = Added

Thread ID:

Created:

Updated:

Platform:

Replies:

67004 Aug 7,2007 10:41 AM UTC Jun 16,2011 11:22 AM UTC Windows Forms 8
loading
Tags: Grouping
James Evans
Asked On August 7, 2007 10:41 AM UTC

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 ?

haneefm [Syncfusion]
Replied On 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

James Evans
Replied On 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

James Evans
Replied On August 8, 2007 07:57 AM UTC

this project has the resources in it

GridGroup1.zip

Ramya R [Syncfusion]
Replied On 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.

James Evans
Replied On August 9, 2007 04:33 PM UTC

This has now been lodded in Direct-Trac

Administrator [Syncfusion]
Replied On 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.


Deepa
Replied On October 4, 2010 08:17 PM UTC

Has this been fixed?
Which version is the fix available?

Thanks,
Deepa.


Nihar Ranjan Dalai
Replied On 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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;