Custom modal for specific column
Custom modal for specific column
Hi,
I use the inline editor with offline data and I would like to open a custom search modal for a specific column. Every other columns must be inline editable except this one which should be readonly. After selection in the modal, I would like to write the selected value to the cell.
Can someone tell me how to trigger the show modal?
Also, it seems that the edited value in regular cells is not kept in the table. When I write in a cell, the value disappear on the next cell edition. Is this a common problem?
Thank you
Michael
This question has an accepted answers - jump to answer
Answers
Hi Michael,
The first thing to do would be to limit the triggering of inline editing of columns to only those which you wish to be inline editable - this example shows how that can be done.
Then add a click event listener to your other column which will trigger whatever modal you want to use.
Allan
Oh right, that was pretty obvious.
Now that I have my value from my modal, I want to put it the selected cell, but when my modal opens, I lose the focus class on the td. Is there another way to get the current cell?
I managed to get the cell with some global variable set in the click trigger, but I wonder if there is a better way.
Also, I would like to know if there is a AfterEdit event that I could attach to execute custom code?
A global is fine. I'd use two different click listeners, but either will work.
The event you are looking for is
postEdit
.Allan