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

Problem with RecordDeleted event in GGC

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

1 Reply

AD Administrator Syncfusion Team July 8, 2005 02:09 PM UTC

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

Live Chat Icon For mobile
Up arrow icon