jQWidgets Forums

jQuery UI Widgets Forums Grid delete database customerid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • delete database customerid #61054

    hk
    Participant

    I am using the below code to delete but everytime I send the request it only sends the index not the actual id
    // delete row.
    $(“#deleterowbutton”).bind(‘click’, function () {
    var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
    var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
    var id = $(“#jqxgrid”).jqxGrid(‘getrowid’, selectedrowindex);
    alert(id);
    $(“#jqxgrid”).jqxGrid(‘deleterow’, id);
    }
    });

    I expect the alert (id) to show me customerid and not the selectedindex?? please help I am so stuck for the last two days

    delete database customerid #61058

    Peter Stoev
    Keymaster

    hi hk,

    If it shows you index, then you should update your data binding code and especially set the source object’s id property to the field you wish to be ID.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.