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
close icon

RecordDeleted event not responding..

Hi, When I delete a row on my GGC, nothing happens. My RecordDeleted event doesn''t seem to be responding. My other events such as TableControlCurrentCellDeleting seem to be working fine. Do you have any idea what the problem is? Regards David

3 Replies

AD Administrator Syncfusion Team July 6, 2005 05:53 PM UTC

How are you deleting the record? For example, in a button click handler, this code will delete the current record and also raises the RecordDeleted event for me.
private void button1_Click(object sender, System.EventArgs e)
{
	if(this.gridGroupingControl1.Table.CurrentRecord != null)
		this.gridGroupingControl1.Table.CurrentRecord.Delete();
}


TH Thabo July 7, 2005 06:24 AM UTC

>How are you deleting the record? > >For example, in a button click handler, this code will delete the current record and also raises the RecordDeleted event for me. > >
>private void button1_Click(object sender, System.EventArgs e)
>{
>	if(this.gridGroupingControl1.Table.CurrentRecord != null)
>		this.gridGroupingControl1.Table.CurrentRecord.Delete();
>}
>
Hi, I use the delete button on the keyboard to delete a single row i.e. the user clicks the row they want to delete and then press the delete button on the keyboard.


AD Administrator Syncfusion Team July 7, 2005 09:39 AM UTC

If you only want to do it when your user clicks a row header cell and presses teh deletekey, then try handling this event.
private void gridGroupingControl1_TableControlKeyDown(object sender, GridTableControlKeyEventArgs e)
{
	if(e.Inner.KeyCode == Keys.Delete)
	{
		if(this.gridGroupingControl1.Table.CurrentRecord != null)
			this.gridGroupingControl1.Table.CurrentRecord.Delete();
	}
}
If you want to do it from any cell in the row, then try handling this event.
private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
	if(e.Inner.KeyCode == Keys.Delete)
	{
		if(this.gridGroupingControl1.Table.CurrentRecord != null)
			this.gridGroupingControl1.Table.CurrentRecord.Delete();
	}
}

            

Loader.
Live Chat Icon For mobile
Up arrow icon