cancel
Showing results for 
Search instead for 
Did you mean: 

deleting a row from matrix by context menu

Former Member
0 Kudos

Hi all

does anyone know how can i cause right click on mouse button. on a certain row within a matrix to show a context menu with the option to delete the row. and when pressing the menu item handling the event of deleting the row from the matrix?

appreciate the help

Yoav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yechiel,

for using Context Menu u have to enable that first, the id for that menu is: 1293

use this line:

formobject.EnableMenu("1293", true)

and you have to used these events to write the code for delete that row

etDeleteRowBeforeAction

etDeleteRowBeforeAction

Hope it helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Yoav,

Simply, 'context menu' have to be handled with 'menu event' object.

It can be done by 'flushToDataSource' method and some tricks.

Basically, method delete the row without any clause of addon code.

But it's only can be done in display side.

If you're using DBDataSource, you have to flush to the datasource.

I mean, you have to update datasource with the data displayed in the matrix.

and then, delete the last row of the datasource.

FlushToDataSource doesn't affect to the number of rows in the datasource.

You have to delete a row with a method of DBDatasource.. I can't remember the name.

If, the matrix uses userdatasource, you don't need to delete a row in datasource.

Because userdatasource doesn't have a concept of 'row', actually.

Hope this helpful for you.

Regards,

Hyunil Choi

Former Member
0 Kudos

Hi Hunil

my question remains for the context menu, How can i set it to display the option of deleting a row and handle the event of choosing this option?