Is the table empty?
Is the table empty?
GeorgeHelmke
Posts: 44Questions: 16Answers: 0
I would like to be able to know if the table is empty. Starting editor.inline(this) with no rows available ends up with a crash.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
How are you currently adding event listeners to start the
inline()
edit? What you could do is modify the jQuery selector to ignore the empty row - for example:Another option would be to use the
data()
method and check its length. If the length is 0, then there are no records in the table:Regards,
Allan
I went for the second option, worked perfectly. Thanks!