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.

RecordDeleted event not responding..

Thread ID:

Created:

Updated:

Platform:

Replies:

31377 Jul 6,2005 10:35 AM Jul 7,2005 05:39 AM Windows Forms 3
loading
Tags: GridControl
Thabo
Asked On July 6, 2005 10:35 AM

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

Administrator [Syncfusion]
Replied On July 6, 2005 01:53 PM

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();
}

Thabo
Replied On July 7, 2005 02:24 AM

>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.

Administrator [Syncfusion]
Replied On July 7, 2005 05:39 AM

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();
	}
}
 

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.

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.

;