How exactly are you meant to use the methods for jQuery BootGrid?
I've tried:
$("#presentation-listing-api").bootgrid('remove', [uid]);
Doesn't seem to be working?
It's not helpful that the documentation isn't quite finished yet.
It should be noted, as of version [1.3.1], the "remove" feature is not supported when using the ajax option. There is a note in the source that reads
[ todo: implement ajax DELETE]
An alternative could be something like this:
$('[data-row-id="'+uid+'"]').remove();
The way to do it was kind of convoluted but I figured it out...
You have to mark your id column as an identifier and the type to numeric like this:
<th data-column-id="id" data-identifier="true" data-type="numeric">ID</th>
Then, MAKE SURE the values in that column are unique!!!
Then call the remove like this:
rows[0] = uid;
$("#presentation-listing-api").bootgrid('remove', rows);
What I did was took the Commands demo and modified it to load just some data then worked on getting the remove to work.
Here's a working fiddle:
http://jsfiddle.net/Mrbaseball34/zszc8zL6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With