Title: how to delete multiple data in datagrid based on a criteria ? Post by: aswzen on October 23, 2014, 06:54:06 AM how to delete multiple data in datagrid based on a criteria ?
example i have datagrid like this one.. (http://i.imgur.com/J7uzNl1.jpg) then i want to delete all data that branded 'PANASONIC'.. and this is my code Code: var rows = $('#table_default').datagrid('getRows'); but this code is not working properly.. do you know why??? IT'S BECAUSE the table index began to reindex again the table after deleted a data..now i'm stuck to think another way... NB and FYI : i don't want to put the code in onLoadSuccess any solution? thanks in advance.. Title: Re: how to delete multiple data in datagrid based on a criteria ? Post by: jarry on October 23, 2014, 07:42:50 AM Please call 'getRowIndex' method to get the row index before deleting it.
Code: var dg = $('#table_default'); Title: Re: how to delete multiple data in datagrid based on a criteria ? Post by: aswzen on August 13, 2015, 06:05:38 AM its working thank you.. :)
i think this super important instruction must be written in documentation.. |