How to select a row that has just been added with editor
How to select a row that has just been added with editor
![BingCommander](https://secure.gravatar.com/avatar/3627a0ba439f07fe90cd0af24449fc8d/?default=https%3A%2F%2Fvanillicon.com%2F3627a0ba439f07fe90cd0af24449fc8d_200.png&rating=g&size=120)
I would like for newly created rows to be automatically selected. I've tried the following code:
editor.on('postCreate', function (e, json, data, id) {
table.row('#' + id).select();
});
It looks like the data is already in the table at that point, but I can't query out the row yet. Is there another event that I could attach this to?
This discussion has been closed.
Answers
I guess you would have to pass an array just like in this example and maybe something like '#row-' + id. Just find out by experimenting and using your debugger.
Yep, I found this in my code. Looks like you need to add '#row_'.