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

Vinz: How to trigger the GridgroupingControl Deleting Event using other Component ?

Thread ID:

Created:

Updated:

Platform:

Replies:

21188 Nov 4,2004 07:00 AM UTC Nov 5,2004 07:22 AM UTC Windows Forms 5
loading
Tags: Grouping
Vincent Loy Chee Hoon
Asked On November 4, 2004 07:00 AM UTC

Hi, Is there any way to trigger the GridGroupingControl Events (eg _RecordDeleting)in another Component/Object(eg Button) Event (eg _Click)? Currently, I want to delete a record in the GridgroupingControl by allowing user to select a record and then click on a button to delete the record. Can anyone tell how to do it? I tried to used a single Event function to handle 2 Events (Button_Click & GridGroupingControl_RecordDeleting) but it prompted me that both events doen''t have the same signature. Please advice...thanks :) Best Regards Vinz

Administrator [Syncfusion]
Replied On November 4, 2004 11:09 AM UTC

Raising the RecordDeleting event does not actually delete a record. The action of deleting the record is what raises the event. To delete a record, try using this.gridGroupingControl1.Table.DeleteRecord. It is in the code for this method that RecordDeleting is raised. The DeleteRecord method check the event args passed into the event to see whether or not it should actually delete the record, giving the listeners to the event the option of controlling whether the record gets deleted or not. But the event itself does not actually delete anything.

Vincent Loy Chee Hoon
Replied On November 4, 2004 11:25 PM UTC

Thanks Clay :), but a question here.. does this.gridGroupingControl1.Table.DeleteRecord method actually deletes the record in it referenced datasource and update the actual database itself ?? >Raising the RecordDeleting event does not actually delete a record. The action of deleting the record is what raises the event. > >To delete a record, try using this.gridGroupingControl1.Table.DeleteRecord. It is in the code for this method that RecordDeleting is raised. The DeleteRecord method check the event args passed into the event to see whether or not it should actually delete the record, giving the listeners to the event the option of controlling whether the record gets deleted or not. But the event itself does not actually delete anything.

Vincent Loy Chee Hoon
Replied On November 4, 2004 11:37 PM UTC

hi Clay, I realised I need to pass in a parameter of a type called Syncfusion.Grouping.Record into this.gridGroupingControl1.Table.DeleteRecord(). So which property or method in GridGroupingControl will return such type? or Are there other alternatives which I can capture this information? Appreciate for advices, thanks ;) >Raising the RecordDeleting event does not actually delete a record. The action of deleting the record is what raises the event. > >To delete a record, try using this.gridGroupingControl1.Table.DeleteRecord. It is in the code for this method that RecordDeleting is raised. The DeleteRecord method check the event args passed into the event to see whether or not it should actually delete the record, giving the listeners to the event the option of controlling whether the record gets deleted or not. But the event itself does not actually delete anything.

Vincent Loy Chee Hoon
Replied On November 4, 2004 11:37 PM UTC

hi Clay, I realised I need to pass in a parameter of a type called Syncfusion.Grouping.Record into this.gridGroupingControl1.Table.DeleteRecord(). So which property or method in GridGroupingControl will return such type? or Are there other alternatives which I can capture this information? Appreciate for advices, thanks ;) >Raising the RecordDeleting event does not actually delete a record. The action of deleting the record is what raises the event. > >To delete a record, try using this.gridGroupingControl1.Table.DeleteRecord. It is in the code for this method that RecordDeleting is raised. The DeleteRecord method check the event args passed into the event to see whether or not it should actually delete the record, giving the listeners to the event the option of controlling whether the record gets deleted or not. But the event itself does not actually delete anything.

Administrator [Syncfusion]
Replied On November 5, 2004 07:22 AM UTC

What record do you want to delete? Try this.gridGroupingControl1.Table.CurrentRecord to get the current record.

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

;