jquery Bootgrid: get all rows data - jquery-bootgrid

I need to filter rows in my jQuery Bootgrid (with pagination).
How I can get ALL rows from grid?
When I try to do this $('#TableId').bootgrid().data('.rs.jquery.bootgrid')
it returns only rows in first page.

Almost there. Try this:
$('#TableId').bootgrid().data('.rs.jquery.bootgrid').rows
returns all rows data(array) that Bootgrid used right now.

Related

Kendo grid function 'selectedKeyNames' not retrieving multiple rows

I have a Kendo grid with the ability to have multiple rows selected. I'm trying to get all rows selected by using selectedKeyNames method:
var jsonArray = grid.selectedKeyNames();
This doesn't return anything. I went to kendo's example of selectedKeyNames on there site
I removed grid.select("tr:eq(2)");, selected all rows and ran it. After pressing F12, I can inspect the array of rows that should be returned, which is also empty.
How do I use selectedKeyNames to get an array of the rows selected? Or should I be using other functions?

Kendo Grid sorting not working with blank data

We are using kendo Grid component for one of our reports. Grid column, sub column sorting is working fine when we have proper data but it fails in case of blank data. Please find the screenshot for the same.
Try adding the schema, which sets the type of the column you are sorting. It works that way.

Dgrid sorted but not sorted in the store?

when I sort the dgrid, clicking on some column header, the view of the grid changes. When for example I call "getSelectedRows" on the grid object, I get the list of selected rows but not sorted.
I need to get on the js, the list of sorted rows because I must print them in a pdf in the same sorting that the grid views the results.
Is there in dgrid a function, an object or something else to permit me to get this result?
Thank you very much!!!!!
It depends on which version of dgrid you are using, if you are using dgrid 0.3 you can get rendered data of grid like this from it's store
var sortedData=grid.store.query(grid.get('query'),{sort:grid.get('sort')});
in dgrid 0.4 you can just use_renderedCollection property of dgrid

Display the total number of rows in a Slickgrid table

Is there an accepted way to display the total number of rows in a slickgrid table. I see that there is a pager that I can include on my pages, but that comes with additional buttons/settings for pagination.
I am using a DataView object with no grouping. Ideally I'd like to simply have a trivial row at the bottom of the viewport that lists how many rows are in the table.
I could do this manually but wasn't sure if I was missing something in the Slickgrid APIs/configuration.
Use this method...to get number of rows displayed in the grid..(if no pagination is there)
grid.getDataLength();
if pagination is there....use this..
grid.getData().getPagingInfo().pageNum
grid.getData().getPagingInfo().pageSize
grid.getData().getPagingInfo().totalPages
grid.getData().getPagingInfo().totalRows // what u want
Use the onRowCountChanged for dataView argument in Slick Grid.
dataView.onRowCountChanged.subscribe(function (e,args)
{
$("#RowCount").text(args.current);
});

Accessing the whole table when using the tablesorter and tablesorterPager jQuery plugin

I am using the tablesorter and tablesorterpager plugin and I really like it.
http://tablesorter.com/docs/
http://tablesorter.com/docs/example-pager.html
However I need help with a problem I have. I use checkboxes for every row in a table for selecting items. I also have a “select all” checkbox in the table header.
When looking at the pager script I understand that the plugin completely removes all the table rows from the DOM and only renders the visible rows, the rest of the table is cached.
So when using code similar to this:
$("#theTable").find("input[name='cbitems']:not(:disabled)").each(
I will only get elements currently visible. Not elements in "hidden" pages.
So my question is; is there anyway to make the cached table accessible?
For example:
$("#theTable").cachedTable.find("input[name='cbitems']:not(:disabled)").each(
I have tried reading up on object oriented javascript (or what to call it), but no success.
To answer my own question:
The cached table is accesible, I had just left out the [0] part.
$($("#theTable")[0].config.rowsCopy).each(function() {
$(this).find("input[name='nodeitems']:not(:disabled)").attr('checked', check);
});

Resources