editor.edit with a known record ID

editor.edit with a known record ID

lucianolunalucianoluna Posts: 7Questions: 2Answers: 0

Hello, I'm finding a way to programmatically edit a record with a specific ID (or primary key)

Something like this:
editor.edit( MyRecordID, {
title: 'Editing the record'
});

How to achieve that?

Answers

  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin

    That should be it! If that isn't working for you, could you give me a link to a page showing the issue please?

    Allan

  • lucianolunalucianoluna Posts: 7Questions: 2Answers: 0

    No, I'm sorry, in the below code do not open the editor on the record with ID = 4, but it opens the editor on the fourth record listed on the table

    editor.edit( 4, {
    title: 'Editing the record'
    });

    To show you the code I have install the application on a public server, now it is on my development pc.

  • colincolin Posts: 14,526Questions: 1Answers: 2,482

    That approach is working here, so it would suggest something odd in your code. It's possible the ID isn't being detected, if it's not DT_RowId you need to specify it in the options with idSrc - see example here,

    Colin

Sign In or Register to comment.