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.

Problem with RecordDeleted event in GGC

Thread ID:





31520 Jul 8,2005 08:11 AM Jul 8,2005 10:09 AM Windows Forms 1
Tags: GridControl
Asked On July 8, 2005 08:11 AM

Hi, For some reason my RecordDeleted event won''t respond. I have an event handler called DataSheet_TableControlCurrentCellKeyDown. It is in this event handler where the RecordDeleted event is suppose to be triggered. the code below shows what i''m trying to achieve. //Initialize GridTableControlKeyEventHandler tableControlKeyEventHandler = new GridTableControlKeyEventHandler(DataSheet_TableControlCurrentCellKeyDown); TableControlCurrentCellKeyDown += new GridTableControlKeyEventHandler(DataSheet_TableControlCurrentCellKeyDown); RecordDeleted += new Syncfusion.Grouping.RecordEventHandler(DataSheet_RecordDeleted); private void DataSheet_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e) { if(e.Inner.KeyCode == Keys.Delete) { Record rec = e.TableControl.Table.CurrentRecord; if(rec != null) { int i = e.TableControl.Table.FilteredRecords.IndexOf(rec); if(i > 0) { e.TableControl.Table.CurrentRecord = e.TableControl.Table.FilteredRecords[i-1]; e.TableControl.Table.CurrentRecord.SetSelected(true); } rec.Delete(); e.Inner.Handled = true; . . . } private void DataSheet_RecordDeleted(object sender, Syncfusion.Grouping.RecordEventArgs e) { //my code here } The line rec.Delete() is suppose to trigger the RecordDeleted event. For some reason it''s not triggering it. Regards David

Administrator [Syncfusion]
Replied On July 8, 2005 10:09 AM

If you put a stop on the rec.Delete(); line, is it being hit? Are there any exceptions being shown in your output window?


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.

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.