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

Cancel SourceListListChanged event in gridGroupingControl

Hi, I am using this.gridGroupingControl.SourceListListChanged += event. On this event I want to check if the column mapping name in "abc" I want to cancel that event.How can I do it..? Thanks, Prathima

3 Replies

AD Administrator Syncfusion Team August 10, 2005 02:56 AM

As a general rule, events that end in ''ed'' are strictly notification events, they cannot be canceled. They happen after the action has been performed. To cancel things, you need to catch an ''ing'' event. So, exactly what behavior to you want to cancel, and is there some ''ing'' event associated with it? The SourceListListChanged event is a noticification event that occurs after the datasource has raised its ListChanged event. This means the action has already been performed on the datasource, and the grid cannot avoid it.


PV Prathima Venkobachar August 10, 2005 05:15 AM

I have a requirenment as below.Pl suggest how can I go about it. I have created a user control using gridGroupingControl. I use this control in two scenarios. 1.To display data in the grid and it has update option either row by row or On click of a button. 2.We have a import functionlaity .User can import data from the excel file and displays record in the form.Here they have option of updating only on click of a button. But The grid will have a checkbox in the column to select the records that they want to upadte. For both scenarios I am using the user control. The problem I am facing is in import scenario when the user selects the record to be updated , this event is firing. Also I have observed this this.gridGroupingControl.SourceListListChanged += event is costly..I mean this event fires in few other places where also. Can you suggest some best event for this requirenment..? Thanks, Prathima


AD Administrator Syncfusion Team August 10, 2005 08:13 AM

Maybe you can use the grid.RecordValueChanged event to set a flag that indicates whether it is some field other than your checkbox that was changed. (You can check the e.FieldDescriptor to see what was chnaged.) Then in SurceListListChanged, you can test this flag to see if the only that that was changed was the checkbox. This means in SourceListListChanged, you can skip your code if only the bool value has changed.

Loader.
Live Chat Icon For mobile
Up arrow icon