jQuery UI Widgets Forums DataTable How to delete a row when its row index is unknow

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 3 months ago.

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

  • michaelwur
    Participant

    Hi,
    I am learning to use the DataTable widget. I would like to delete a table row in some use cases. The API function requires the row’s index but it is unknown. I referred to the documentation but there is no functions to ‘search’ rows.

    What is the right approach?

    Should I implement a function to get all rows of the data table and iterate over the rows to find the target row to delete? Please advise!

    Best regards,
    Michael Wu


    Dimitar
    Participant

    Hi Michael,

    If you do not know the row’s id, your suggested solution (“get all rows of the data table and iterate over the rows to find the target row to delete”) is the right approach. You can get the data table’s rows with the method getRows.

    Best Regards,
    Dimitar

    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.