Why doesn't my "create new record" or edit/delte icons work - Page 2

Why doesn't my "create new record" or edit/delte icons work

2»

Answers

  • drfunkdrfunk Posts: 58Questions: 8Answers: 0

    ok I figured it out

  • drfunkdrfunk Posts: 58Questions: 8Answers: 0

    last question... I hope :blush:
    Can I edit an existing row without editor?

  • drfunkdrfunk Posts: 58Questions: 8Answers: 0

    added this:
    // Edit record
    $('#modport tbody').on( 'click', 'tr .fa-pencil', function () {
    table.row( this ).edit( {
    buttons: [
    { label: 'Cancel', fn: function () { this.close(); } },
    'Edit'
    ]
    } );
    } );

    but it didn't work

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

    Editor will do that for you :)

    Colin

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited March 2022 Answer ✓

    Go back to this example I linked at the start of the this thread:
    http://live.datatables.net/xijecupo/1/edit

    See how its getting the row data for the clicked row. Use something similar and use that to populate an edit form. Then use row().data() as a setter to update the row data in the table.

    Kevin

  • drfunkdrfunk Posts: 58Questions: 8Answers: 0

    yes I am on that track. see this:
    http://live.datatables.net/dugigipe/4/edit

    but for some reason it is not populating my edit form

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Out of interest, is there something that Editor doesn't do that you need, or is it the price that puts you off it?

    Allan

  • drfunkdrfunk Posts: 58Questions: 8Answers: 0

    HI Allan,

    This is a one time project that I was asked to do. It is certainly not my expertise as I am sure you all could see. I would absolutely buy Editor if I were to do this for a living. The cost is very affordable and it seems like it would be an excellent tool. I just have one last thing I am hoping to tackle - that is getting the edit piece to work.

Sign In or Register to comment.