Free Support Forum - aspose.com

Insert row / Col event

Hi,


I want to trape the event of inserting a row or a column in a griddesktop. Is there any way do do it ?
I use Aspose.Cells.GridDesktop 2.7.0.2000.

Hi,

Thanks for your question and using Aspose.Cells for GridDesktop.

Please download and use the latest version:
Aspose.Cells
for GridDesktop v2.7.9.2000


And for your help relating to GridDesktop events, please see the following article.


I always try with this version but there is no event concerning inserting rows / cols.

Hi,

Thanks for your feedback.

It appears to be a New Feature. We have logged a New Feature Request for this issue and also if we have any workaround, we will share it with you asap.

This issue has been logged as CELLSNET-41087.

Hi,

Please download and try the latest fix:
Aspose.Cells
for GridDesktop v2.7.11.2001


Now we have added these two events AfterInsertRows, AfterInsertColumns in Aspose.Cells.GridDesktop

Here is the sample code :

C#
private void mycustom_rowinserted(object sender, Aspose.Cells.GridDesktop.WorksheetEventArgs args)
{

{
string message = "row inserted event is raised. " + "new inserted row index is " + args.Index;
MessageBox.Show(message);
}
}

private void mycustom_colinserted(object sender, Aspose.Cells.GridDesktop.WorksheetEventArgs args)
{

{
string message = "column inserted event is raised. " + "new inserted column index is " + args.Index;
MessageBox.Show(message);
}
}



//then in InitializeComponent we can add event handle like this :
this.gridDesktop.AfterInsertRows += new Aspose.Cells.GridDesktop.WorksheetEventHandler(this.mycustom_rowinserted);
this.gridDesktop.AfterInsertColumns += new Aspose.Cells.GridDesktop.WorksheetEventHandler(this.mycustom_colinserted);


The issues you have found earlier (filed as CELLSNET-41087) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.