I am trying to make a BatchEdit grid (EJ2) with a specified order with a hidden field (i am trying to manage the order of the lines with a 'Order' field). So i will have to manage the value of the 'Order' field, by calculating the 'order' field using the values from the row above and below.
Now i want to insert a new record in a specific index, but i can't. It always insert into the top or the bottom of all records. I know that there are options in the Grid, .NewRowPosition(NewRowPosition.Bottom or NewRowPosition.Top), but i dont want any of them. I want to insert above selected line.
In this image, i have a custom ContextMenuItem which says 'Insert line' and i want to create the new record above the selected line, in this case between the lines which says 'second' and 'third'.