Edit only some rows

Edit only some rows

impex09impex09 Posts: 45Questions: 20Answers: 0

Hi, my question is if it is possible to edit only some rows, for example, I have a table about users with incomplete information (the previous register) so..

I have a table of pre-registration of users, so once a user finishes their registration, then he should no longer be able to modify his information.
and if the administrator, once he finishes completing the information of a user A, the user A will no longer be able to edit that user, only pending users.

I was thinking of having a flag field, if that field is fill out, disable the edit and delete buttons for that user only.

thanl you for you support.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @impex09 .

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • impex09impex09 Posts: 45Questions: 20Answers: 0

    thank you, works perfect, the only issue is when I want to create a new field.
    not it open the new form
    do you know what could be?

  • impex09impex09 Posts: 45Questions: 20Answers: 0
    edited September 2019

    the error is:
    table.modulo_aspirantes.js:207 Uncaught TypeError: Cannot read property '0' of null

    editor.on( 'preOpen', function() {
    if (table.row(editor.modifier()[0]).data().cat_nivel.nombre_nivel === 'DOCTORADO') {
    return false;
    }
    return true;
    })

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @impex09 ,

    When you say create a new field, do you mean inline editing?

    Cheers,

    Colin

  • impex09impex09 Posts: 45Questions: 20Answers: 0

    yes but I can resolve, thank you. so, sometimes I have an issue when I try to edit only one field, the other fields set to default value (always is the first value) do you have any idea?

    thank you

    regards.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    That's not standard behaviour, see example here, so it's going to be something specific to your implementation. It could be because the server is sending those fields back in response to the edit, but without seeing your code (or a link to your page) it's impossible to say.

This discussion has been closed.