I know this may seem as a dupplicate and by all means, show me which one, 'cause I have spent 2 days looking for a similar question but to no avail. I have a table in which the user can select rows by checking them and the option "View Record". My problem is the navigation buttons inside the "View Record"-pane are disconsidering the selected rows completely. If I have four rows and check rows 1 and 3 because I want to see the records of only those two, I click on the next button after I saw record 1 and row 2 is then showed, not the thrird. This is not the wanted behaviour. Anyone has an ideea how to make it so that the navigation buttons of the "view record" only allows the navigation between the selected rows? Many thanks in advance.
Oh, here is my code:
var resultItems = [
{
customerId: 20000001,
customerName:"Customer 1",
},
{
customerId: 20000002,
customerName:"Customer 2",
},
{
customerId: 20000003,
customerName:"Customer 3",
} ,
{
customerId: 20000004,
customerName:"Customer 4",
}
];
var fields = [
{name: "Id", label: "Id", search: true, key: true}, //, hidden:true
{name: "customerName", label: "Kunde", search: true, sortable: true,prefix:null,},
{name: "customerId", label: "Customer-ID", search: true, sortable: true,prefix:null,}
];
$(function () {
"use strict";
$.jgrid.guiStyles.jQueryUI.dialog.window = "dijitPopup ui-jqgrid-jquery-ui ui-widget ui- widget-content ui-corner-all ui-front";
$("#enhancedReportingGrid").jqGrid({
datatype:"local",
colModel: fields,
data: resultItems,
iconSet: "fontAwesome",
loadonce: true,
viewrecords: true,
width: 780,
height: 200,
multiselect:true,
pager: "#enhancedReportingGridPager",
});
$('#enhancedReportingGrid').jqGrid('navGrid', '#enhancedReportingGridPager',
{add: false, edit: false, del: false, search: false, view: true}, {width: 500});
});
I suggest you to switch to the supported commercial Guriddo jqGrid version.
I have just added in Guriddo jqGrid a option viewselected in viewGridRow method, which allow you to view only selected rows in multiselect mode. The option editselected do the same for edit mode. This option (editselected) also exists in older releses.
This feature will be available in the upcoming release which is scheduled for a September 1, 2020
Here is a working Guriddo demo