1

I'm trying to set up a function to get a particular cell value using the jqGrid and lib.web.mvc. I can't figure out with the documentation on how to accomplish this...

I have the following set up in my JqGridHelper helper definition. Notice the onCellSelect: "getImageId" property where the issue is.

<table id="fuelTickets" class="table">
              @{
                var grid = new JqGridHelper<FuelTktImgRetrievalMdl.ViewModels.HH_FuelTkt_Output>("FuelTickets",
                  dataType: JqGridDataTypes.Json,
                  methodType: JqGridMethodTypes.Post,
                  pager: true,
                  rowsNumber: 10,
                  sortingName: "FuelTkt_ID",
                  sortingOrder: JqGridSortingOrders.Asc,
                  viewRecords: true,
                  autoWidth: true,
                  gridView: true,
                  JqGridParametersNames.HH_FuelTkt_Input,
                  url: Url.Action("GetFilteredFuelTicketsAsync"),
                  caption: "Fuel Tickets",
                  onCellSelect: "getImageId",
                  emptyRecords: "No records to view"
                );
            }
        </table>

My function is below in the javascript on the page as follows:

function getImageId(rowid, iCol, cellcontent) {
                var grid = $('#fuelTickets');
                var imageID = grid.jqGrid('getCell', rowid, 'Image_ID');
                if (imageID != "")
                    DisplayReceipt(imageID);
            }
sagesky36
  • 4,542
  • 19
  • 82
  • 130

0 Answers0