I was using the html table. My requirement is, i want to listen for the changes of rows count. Is there anyway to achieve this?
Note: I don’t have the adding/deleting a row functions here to achieve.
Moreover that, i have tried this,
$("#myTable>tbody>tr").watch("length", function () {
alert("row count changed..")
});
But, the above code doesn’t work for me. Could any of you know how to do this?
Thanks in advance,
-Raja.
The only cross-browser way to do this at the moment would be with a setInterval and possibly a custom event.
I would suggest triggering the event manually when you change the number of rows rather than using an interval if possible.
UPDATE:
Use the jqGrid
refreshevent.If you are manually deleting any rows on click, you will need to run your code there too unless it is also reloading the grid.