How to select a row that has just been added with editor

How to select a row that has just been added with editor

BingCommanderBingCommander Posts: 5Questions: 3Answers: 0

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?

Answers

  • rf1234rf1234 Posts: 2,986Questions: 87Answers: 421
    edited January 2019

    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.

  • rf1234rf1234 Posts: 2,986Questions: 87Answers: 421
    edited January 2019

    Yep, I found this in my code. Looks like you need to add '#row_'.

This discussion has been closed.