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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multi Select Delete

Thread ID:

Created:

Updated:

Platform:

Replies:

63066 Jun 27,2007 05:54 PM UTC Jun 27,2007 08:28 PM UTC WinForms 3
loading
Tags: GridControl
Thanvir Hussain
Asked On June 27, 2007 05:54 PM UTC

Hi,
I have derived a FormulacellModel to a custom cell model and all my cells in the Grid are set to this custom celltype. Inside the custom model I access a
CustomProperty and when the cell text changes I set the value to the customproperty.
I have overridden the TextBoxChanged/OnEditingComplete methods.
Now when I multi select cells and delete the event is fired only for the last cell in the selection. So the gird now shows empty value but when I access my customproperty the value is not cleared.
Can you let me know how to handle this?

haneefm [Syncfusion]
Replied On June 27, 2007 06:16 PM UTC

Hi Thanvir,

You can handle the Model.ClearingCells event and reset the CustomProperty there. Below are the code snippet to resolve this issue.

this.gridGroupingControl1.TableControl.Model.ClearingCells += new GridClearingCellsEventHandler(Model_ClearingCells);

private void Model_ClearingCells(object sender, GridClearingCellsEventArgs e)
{
Console.WriteLine( e.RangeList.ActiveRange);
}

Best regards,
Haneef

Thanvir Hussain
Replied On June 27, 2007 06:21 PM UTC

Hi,
Thanks for the quick reply.

Is it possible to handle the clear event inside my customcellrenderer class, because I will be using this customcell across several girds and don't want to handle the clear event in each of the grid.

thanks
thanvir.

>Hi Thanvir,

You can handle the Model.ClearingCells event and reset the CustomProperty there. Below are the code snippet to resolve this issue.

this.gridGroupingControl1.TableControl.Model.ClearingCells += new GridClearingCellsEventHandler(Model_ClearingCells);

private void Model_ClearingCells(object sender, GridClearingCellsEventArgs e)
{
Console.WriteLine( e.RangeList.ActiveRange);
}

Best regards,
Haneef

haneefm [Syncfusion]
Replied On June 27, 2007 08:28 PM UTC

Hi Thanvir,

Yes. You need to subscribe the ClearingCells event in a customcellrenderer constructor and reset you custom property . Below are the code snippet.

public class customcellrenderer:GridStaticCellRenderer
{

public customcellrenderer():base()
{
this.Grid.Model.ClearingCells += new GridClearingCellsEventHandler(Model_ClearingCells);
}
private void Model_ClearingCells(object sender, GridClearingCellsEventArgs e)
{
Console.WriteLine( e.RangeList.ActiveRange);
}
}

Best regards,
Haneef

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

;