We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Grid DesktoP AfterInsertRows Event ignored

Grid Desktop API:
AfterInsertRows event is being ignored when a new row inserted.

the following message never shown.

Private Sub GridCell_Work_AfterInsertRows(sender As Object, args As WorksheetEventArgs) Handles GridCell_Work.AfterInsertRows
    MsgBox("inserted a row")
End Sub


Thanks for providing us code segment and details.

I did test your scenario/ case a bit. The event “AfterInsertRows” is fired fine when you manually insert row(s) via GridDesktop’s context menu option (“Insert Row”), i.e., select a cell and then right click on it to display the context menu and then click “Insert Row” to insert a row, the event is fired.

I guess you are talking about inserting a row via code, e.g GridCells.InsertRow/InsertRows method, is not it? We found the event is not fired when we insert a row via code. After your confirmation, we may log a ticket for it into our database.

Thank you.

yes, i was referencing to insert a row via code.
it may not a big deal since custom code can handle the afterInsertRows Event, but this is not consistent with old version, such as 8.4.2.



Thanks for your confirmation.

I have logged a ticket with an id “CELLSNET-45499” for your issue. Our concerned developer from product team will look into it soon. Once we have an update on it, we will let you know here. The ticket is logged as:

  • CELLSNET-45499 - AfterInsertRows event is not fired after using GridCells.InsertRow/InsertRows in code

Thank you.


We evaluated your issue further.

Well, only Worksheet.InsertRow/DeleteRow will raise the event. It still keep consistency with older versions. GridCells.InsertRow/InsertRows are newly added methods in newer versions. There is no CellCollection.InsertRow/DeleteRow in older versions of GridDesktop. It is by design and will not raise the event. So, kindly use Worksheet.InsertRow method in code to instantiate the event for your needs.

Thank you.