editor.edit with a known record ID

editor.edit with a known record ID

lucianolunalucianoluna Posts: 11Questions: 3Answers: 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?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 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: 11Questions: 3Answers: 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: 15,240Questions: 1Answers: 2,599
    Answer ✓

    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.