Inline DT : display column

Inline DT : display column

x14841003x14841003 Posts: 33Questions: 9Answers: 0

Hi again

I would like to implement an inline editing DT with this layout :

id | description | value

When the user enters the 'id', the code will show the 'description' in the 2nd column (so read only) and jump to the 3rd column to be able to enter the 'value'.

How can i achieve this ? will the sql query and display job be done on the client side or server side ?

If you have any example...

Thanks so much, Bye
x1484

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @x14841003 ,

    Is that for a new row, or modifying an existing row?

    If it's:

    1. click on id of an existing row
    2. give it a new value with Editors inline editing
    3. description appears (it would need to be returned by the server as part of the submit response)
    4. submitComplete could initiate inline editing with inline() on the row's value cell.

    Hope that helps,

    Cheers,

    Colin

  • x14841003x14841003 Posts: 33Questions: 9Answers: 0

    Hi Colin,

    It's for a CRUD web screen so both cases are expected.

    For point 3 would this be an AJAX call ?

    Thanks again
    x1484

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @x14841003 ,

    Yep. When point 2 submits the data modified by the inline edit, the server will respond with the full row of data - Editor always does this with edits. Your server script, as part of that response, will get that description field applicable to the ID, which Editor would then display.

    Cheers,

    Colin

  • x14841003x14841003 Posts: 33Questions: 9Answers: 0

    Hi Colin,

    Do you have any example on this ?

    Thanks so much (as usual), Bye
    x1484

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @x14841003 ,

    If you look at the /Editor examples, such as this one here, you can look at the "Ajax load" and "Ajax data" tabs beneath the table (plus the Network tab in the browser's development tools).

    Cheers,

    Colin

  • x14841003x14841003 Posts: 33Questions: 9Answers: 0

    ok thanks Colin

This discussion has been closed.