Edit function

Edit function

rosemaerosemae Posts: 5Questions: 0Answers: 0
edited December 2009 in General
In my database, I have to edit some entries only. It means that I have to limit the edit function to some rows such as my primary key...how can I do this with data tables? thanks.

Replies

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin
    Hi rosemae,

    Have a look at these two threads, which discuss this very topic:

    http://datatables.net/forums/comments.php?DiscussionID=591
    http://datatables.net/forums/comments.php?DiscussionID=529

    Basically you just need to use a particular selector when initialising jEditable.

    Regards,
    Allan
  • rosemaerosemae Posts: 5Questions: 0Answers: 0
    On the posts of bakayn in the 2 pages you suggested, in what page can I find this ---- jQuery('table.styleTable tbody tr td:nth-child(7)').editable( { .... } ); ?

    Please help me on this. Thanks
  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin
    Hi rosemae,

    So that selector will just make only the 7th element in a row (i.e. the 8th column in the table as a whole) editable. So all you need to do if get the selector that you want, and will match the rows that you want to be editable and use that.

    Regards,
    Allan
This discussion has been closed.