FAQ Database Discussion Community


Uncaught TypeError: Cannot read property 'errcap' of undefined

jquery,jqgrid
I encountered the error "Uncaught TypeError: Cannot read property 'errcap' of undefined" in my chrome. On the firefox, i encountered this one: I'm using jqgrid 4.8.2. And here is my code: $("#Grid").jqGrid({ url: "/Templates/Dometic/Services/DometicGenral.svc/GetVehiclesByOemId", datatype: 'json', mtype: 'POST', height: 'auto', colNames: [ 'Edit', 'ID', 'Vehicle brand', 'Model Information', 'Created by',...

How to make jqGrid dynamically populate options list based on row data

dynamic,jqgrid,options
I am using jQrid version 3.8.1 with inline editing and each row in the grid has several dropdown lists to populate. When the user edits the row, I need to do an AJAX query to get the values for each of these lists. I've seen this post regarding how to...

jqGrid Sorting by date and time, but displaying only date

sorting,date,jqgrid,jqgrid-php
I have a column in my jqGrid that currently shows the date in 'd/m/y' format. It is formatted from a date and time string of the format 'Y-m-d H:i:s' and is sorted by date only. The current colModel is like the following: {name: 'published_date', index: 'published_date', formatter: 'date', formatoptions: {newformat:...

jqgrid paging on server side

jquery,jqgrid,server,paging
I'm trying to add server side paging to my grid. In adittion, I have a filter by 'license', 'number' and 'group'. When I press the next page button the controller is called and I obtain the data but my grid is reload on page 1 and I cant view the...

ID values for jqGrid select lists

jqgrid
I am using jQrid version 3.8.1 and I have a grid that displays information about cars. The jQgrid should is set up to display one car per row and one of the columns is a multi-select list that displays which types of seats the car is configured with. A car...

How to fix Cannot read property 'cellIndex' of undefined dragging from one jqgrid column to other in free jqgrid

javascript,jquery,jqgrid,free-jqgrid
Free jqgrid has beforeSelectRow event handler defined as beforeSelectRow: function (rowid, e) { var colName = $.jgrid.getCellIndex($(e.target).closest('td')[0]), .... If mouse button is hold down in one jqgrid column, mouse cursor is moved to other column in same row and mouse button is released, exception Cannot read property 'cellIndex' of undefined...

Reordering columns, Virtual scroll, gridResize in jqgrid does not work

javascript,jquery,css,jqgrid
I am using jqgrid with Symfony to show a datagrid. Oleg's answer solved major problems. Here's my code: <link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/productorderlookup/css/ui-lightness/jquery-ui.css') }}" /> <link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/productorderlookup/css/ui.jqgrid.css') }}" /> <link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/productorderlookup/css/ui.multiselect.css') }}" /> <style type="text/css">...

How to reuse jqGrid options

javascript,jquery,jqgrid
I have seen several post regarding this question. But not get the actual answer I want. I know that I can set a global setting for all of my jqGrids in the application. Then I don't need to mention those options in the newly created jqGrids. But I want to...

Responsive jqGrid with bootstrap classes to the column headers

jquery,twitter-bootstrap,jqgrid
I have the below simple jQGrid. All I need is responsive table with some columns hidden in mobile view using bootstrap helper classes such as hidden-xs var gridInfoJSON = JSON.parse($('#hdn-categorysummary').val()); var catGrid= jQuery("#categorysummary").jqGrid({ url: '/Category/GetCategories/', datatype: 'json', mtype: 'POST', colNames: ["Id", "Active", "Name", "Duration"], colModel: [ { name: 'Id', index:...

JQGrid - td title change on ok of popup box

javascript,jquery,jqgrid
I have editable row in jqgrid. On double click of textbox, it will open a popup box having textarea. On clicking OK of popup, i need textarea value back to jqgrid row cell, from where double click is called. Value of cell is inside title attribute of td. I tried...

How can I detect a jqGrid has been resized?

jquery,jqgrid
I can find no event for when a user resizes a jqGrid with the mouse. I.e. when 'gridResize' set. Is there some way to add a custom event?...

Struts2 jqGrid Remove x On Individual Column Filters

jquery,jqgrid,struts2-jquery,struts2-jquery-grid
I have a struts2-jquery jqGrid page that has a grid with column filters. Some of the columns are date formats, which I do not want to be visible, so I removed the input fields for that column filter using .hide(). $("#gs_fraudEndDt").hide(); However, I still have the small "x" next to...

How to make element sizes to fill cell sizes and increase font in free jqgrid inline and form editing

jquery,html,css,jqgrid,free-jqgrid
jqgrid font size is increasing according to answer from How to change the font size in jqGrid? using .ui-jqgrid tr.jqgrow td { font-size: 1.2em; } Unfortunately this does not change inline and form editing element font sizes. I'm looking for a wayto occupy whole cell contents in free jqgrid inline...

loading local data in jqgrid

javascript,jquery,jqgrid
I am trying to load local data in jqgrid , but its not getting loaded. Here is the fiddle $("#list").jqGrid({ datatype: "local", colNames: ["OrderID", "CustomerID"], colModel: [ { label: 'Order ID', name: 'OrderID', key: true, width: 75 }, { label: 'Customer ID', name: 'CustomerID', width: 150 }, ], viewrecords: true,...

How to force free jqgrid do draw frozen column borders for search toolbar

html,css,jqgrid,free-jqgrid
If actions column has caption "Activity"/custom settings and is frozen, free jqgrid does not draw colum borders for this column in search toolbar. Vertical lines does not appear in search toolbar: How to fix this so that column borders appear for Activity column in search toolbar ? Demo in http://www.ok-soft-gmbh.com/jqGrid/OK/FontAwesome4Large-borderlessOnHover2-frozen.htm...

jqGrid dynamically change search operator type on button click

javascript,jquery,jqgrid
This is my jqgrid Grid related code var lastsel2; var containsOrNot = 'contains'; jQuery(document).ready(function(){ jQuery("#list").jqGrid({ url: "{{ asset('/app_dev.php/_thrace-datagrid/data/item_lookup_management') }}", postData: { masterGridRowId: {{ VPK }} }, datatype: "json", mtype: 'POST', colNames: ['Item No', 'Description 1', 'Vendor Item No','Report Dec','Location','On Hand','Exp balance','Available now','Lead Time','Type', 'Vendor #', 'Status', 'Stocked', 'Product Line', 'Creator'],...

jqPivot is grouping column headers that do not belong to the group

jquery,jqgrid,free-jqgrid,jqpivot
I am trying to utilize the column header group functionality of jqgrid's jqpivot to have two column headers (A header for day of the week, and another header for the actually date). var crewAttendance = { "total": 1, "page": 0, "records": 7, "rows": [ { "ID": "1", "UserID": "10", "AttendanceTypeID":...

How to get jqGrid filtered data in json format?

jqgrid
I want to get data of jqGrid in my controller. I am getting all data of jqGrid using this $("#gridSourceKey").jqGrid('getGridParam', 'data') but I want filtered data in JSON format. How can I get it?...

jqGrid 4.8.0 - Use of the new width size

jquery,jqgrid,free-jqgrid
I'm having a grid, and I also applied the (autoResizable: true) on each column. Now I don't want the grid itself to shrink/widen whenever I double click to resize the column. I want the grid itself to stay as is. I read about setColWidth new function, but failed to use...

Jqgrid search for dates is not working

jquery,json,jqgrid
jq(function(){ var token = window.location.href .substring(window.location.href .lastIndexOf('=') + 1); jq("#grid").jqGrid({ url:'/test/umpire/getFixtures', datatype: 'json', mtype: 'GET', colNames:['Category', 'Tournament','Date', 'Ground','Team 1','Team 2','Umpire 1','Umpire2','Umpire 3','Match Refree','Match Obsrver','Scorer 1','Scorer 2'], colModel:[ {name:'categoryName',index:'categoryName', width:100,editable:true, editrules:{required:true}, editoptions:{size:10,readonly: 'readonly'}},...

Free jqGrid 4.8.0 - Latest changes to toppager_right do not support backward competability

jquery,jqgrid,free-jqgrid
I replaced the jqGrid I had with the latest one from GIT (4.9.0 beta something), and the toppager_right is now defaulted as "display: none;" That basically makes what I had there not visible. I had this $(nameOfGrid + '_toppager_right').append(indication); used for painting some specific html code (marked here as 'indication'),...

How to change Html of a particular cell in jqGrid?

jquery,jqgrid,jqgrid-asp.net
In my jqGrid implementation, we have a subgrid with a dropdown and we want to change the icon in a cell on change of that dropdown. I have used the Formatter to generate the icons shown in the picture below. But now I want to add/remove the icon images from...

Struts2 jqGrid Bind afterclickPgButtons to Edit Dialog

jquery,jqgrid,struts2-jquery,struts2-jquery-grid
I have a struts2-jquery jqGrid page with a grid that uses the event dialog boxes. I'm trying to bind the event afterclickPgButtons to the edit dialog. I can bind events to the entire grid (gridTable), but I'm having issues binding the event to the dialog box. I want to modify...

jqGrid not loading data.The grid is shown but data is not displayed in it

jquery,jqgrid
I wrote a code for jqGrid but I cant get the data into my jqGrid. $(document).ready(function () { jQuery("#jqgrid").jqGrid({ url:"/VendorDetailList.ashx", dataType: "json", data: "{}", height: 'auto', postData: { Entity: function () { return 'vendor'; } }, colNames: ['vendorrep_id','vendor_id','Name', 'Phone Number', 'Job Title', 'Email','Entity'], colModel: [{ name: 'vendorrep_id', index: 'vendorrep_id', key:...

jQgrid: Disable checkbox and row (conditional)

jquery,jqgrid
Based on flag_status passed from PHP data array, I need to disable the row and checkbox. Additionally prevent selection of disabled rows to support select all checkbox in the header of the multiselect column jQuery("#grid").jqGrid({ url:call_url, datatype: "json", height: 'auto', rowNum: 20, rowList: [20,30,40], colNames:[<?php echo $col;?>], colModel:[ {name:'USER_ID',index:'USER_ID', align:'center',search:false,hidden:true,key:true},...

Thrace data grid implementing jqGrid: Doctrine does not fire the query

php,symfony2,doctrine2,jqgrid
I am using Symfony, doctrine ORM, SQL Server on a Linux machine. I am trying to implement Thrace Data Grid as on https://github.com/thrace-project/datagrid-bundle. I followed the steps as they are. Here is my code: index.html.twig {% extends "::base.html.twig" %} {% block stylesheets %} <link rel="stylesheet" type="text/css" media="screen" href="{{ asset('bundles/productorderlookup/css/ui-lightness/jquery-ui.css') }}"...

How to sync header and column separator lines if scrolled to rightmost position in free jqgrid

jquery,css,jqgrid,free-jqgrid
If jqgrid is scrolled to rightmost position, column separator lines are out of sunc. To reproduce, make jqgrid wider than browser window or decrease browser window width so that horizontal scrollbar appear and scroll horizontally to rightmost position. Header and column separator vertical lines are in different positions. How to...

jqGrid 4.8.2 Grid width changes after columnChooser is done

jquery,jqgrid,column-chooser
I am using jqGrid 4.8.2 and have set up my grid with a fixed width. But, when I modify the displayed columns using columnChooser, the width of the grid is readjusted to the combined width of all columns and the horizontal scroll is gone. I've tried resetting the width within...

jqgrid - 'setCell' is not working in Frozen column

javascript,jquery,jqgrid
I have a jqgrid which has frozen columns. I have to update the cell value in a frozen column but it is not working. Here is the fiddler: https://jsfiddle.net/99x50s2s/5/ HTML <table id="sg2"></table> <div id="psg2"></div> <br> <button type='button' id="SetGrid2">Update 'client' in first row of Grid 2</button> JAVASCRIPT jQuery("#sg2").jqGrid({ datatype: "local", gridview:...

How can i set the selected index with data from server to a combobox in a jqgrid

c#,jquery,.net,combobox,jqgrid
I have a jqgrid with a column with a combobox (select), and i set the values in editoptions through a function that returns the required options. My problems is how can i bring there the values saved: e.g: my options are : 1:yes,2:no,3:maybe From the server a client have the...

jqGrid getGridParam('colModel') missing information

jqgrid
I would like capture the colModel for my jqGrid when the page unloads and store it in session so the next time the user comes to the page it can be loaded automatically. But, the information returned by ('#contract_grid').getGridParam('colModel') is missing part or all of the information in searchoptions for...

JqPivot and data load by ajax

jqgrid,free-jqgrid
Can someone post a demo or a piece of code, to exemplify how to use jqpivot and loading data using ajax. Thank you. ...

Jqgrid text blink based on condition in colmodel

jquery,jqgrid
I am fetching record from databases in some action some col model value change in some click at the time i need to differentiate that col-model changed so now the text have to blink .for example there are 5 row and 3 had change in col model and rest not...

JqGrid - Grouping by Column Onluy if first 5 chars are equal

jqgrid
Hello stackoverflow users, I have a table that is already grouped by a column, format of this column is something like: 01100000-8 What I want to do is group if first 5 digits are equal and not all string, for example: 01100000-8 - GROUPED 1 01100303-4 - GROUPED 1 01100003-9...

jqGrid not rendering JSON data into grid

jquery,json,jqgrid
Even though my action method is returning data in JSON format, however, the jqGrid control is not able to render it. Here's the code of the method that returns data in JSON format. ContactContext db = new ContactContext(); // // GET: /Contact/ public JsonResult ContactList(int? selectedContact) { IQueryable<Contact> contacts =...

How to remove free jqgrid own horizontal scrollbar if autowidth:true is used

jquery,html,css,jqgrid,free-jqgrid
Free jqgrid width is set to occupy at least whole window width using settings from jqGrid and the autowidth option. How does it work? answer autowidth: true, shrinkToFit: false, Top level toolbar icons are made bigger using style below from answers. If there are many rows in jqgrid so that...

Struts2 jqGrid Refresh Button Text

jquery,struts2,jqgrid
I have a Struts2 jqGrid on a page. I have the nav bar with the standard refresh button in the default location. My users want the mouse-over text of the button to be "Refresh" instead of the default "Reload Grid". I haven't not been able to find an attribute to...

GridToForm in free-jqgrid

jqgrid,free-jqgrid
I have the next code: if (gsr) { $gridsalariati.jqGrid('GridToForm', gsr, "#form_salariat"); } In free-jqgrid 4.8.0 at line 11630 : $fieldi[propOrAttr]("checked", $fieldi.val() === String(rowdata[i])); When run function: 'GridToForm' show this error: TypeError: $fieldi[propOrAttr] is not a function ...

Free jqGrid 4.8.0 - Setting the total number of paging post grid reload

jquery,jqgrid,free-jqgrid
due to the bad performance on count(*) with our DB (when we deal with 50M records), we don't want to return back to total number of records in each slice of records we retrieve. Instead we want to work without it. I could set the total number of records to...

Free jqGrid 4.8.0 - How to get the gridId from within the field formatter

jquery,jqgrid,free-jqgrid
Is there a way to extract the gridId from within the formatter, unformat functions on the colModel? Thanks,...

Remove Reset button on jqgrid

jqgrid
jqgrid has the search form, this form has 2 buttons "Reset" and "Find", I need to remove the "Reset" button, Is this posible? what is the way?. I has the last version of jqgrid. Thanks.

jqGrid filterToolbar with local data

jqgrid,free-jqgrid
I have a jQgrid that loads data initially via an ajax call from backend(java struts). Again, this is one time load and once loaded, the jqGrid should operate on the data available locally. Initially, datatype:json and once loadcomplete, set datatype:local. Now is there a way to use filterToolbar for local...

How to set up a current page number in jqGrid?

jquery,jqgrid,pager
How to set up a current page number when I am creating a jqGrid ? I tried to add this : $("#grid").trigger("reloadGrid", [{ page: number }]); after this code. $("#grid").jqGrid(...); But it didn't help me....

jqGrid filteredData is not changed although the data of grid is deleted

javascript,jqgrid
I'm using filteredData = $(grid).jqGrid('getGridParam', 'lastSelected') to get data for exporting on jqGrid. It works fine. But there is an issue in special case. Example: I make some filtering to make sure that my grid has only one record. Then I delete that record and export grid. My expectation is...

Reload jqGrid on save/submit

jquery,jqgrid
I have the following code to enter inline editing on double click: ondblClickRow: function (row_id) { if(row_id != null) { $('#Products').jqGrid('restoreRow',last_selected_row); $('#Products').jqGrid('saveRow',row_id); $("#Products").jqGrid('editRow',row_id, true, null, function(){ $("#Products").trigger("reloadGrid", [{current: true}]); }, 'xtras/Products.php', null,{}, {},{} ); $("#Products_ilsave").removeClass('ui-state-disabled'); $("#Products_ilcancel").removeClass('ui-state-disabled');...

JQGrid able to pass ValidateAntiForgeryToken through the main CRUD controls?

jquery,jqgrid,antiforgerytoken
This is my first time setting up a jqGrid, so I implemented a basic grid but am having a rather difficult time passing the __RequestVerificationToken to my controller. $("#RawMatGrid").jqGrid({ url: "/RawMat/GetRawMats", datatype: 'JSON', mtype: 'GET', colNames: [ 'Item', 'Product', 'Description' ], colModel: [ { name: 'Item', key: true, index: 'Item',...

SQL Union tables into treegrid structure for jqGrid

sql-server,jqgrid
I have created an example with the database structure that I currently have: here My goal is to get a database table with all data already in the right place as well as sorted in the right order to be fed into jqGrid which should look like this at the...

Jquery, select all element with a class

jquery,jqgrid
someone could tell me why this code works correctly on chorme but not on the other browsers? $("#"+grid+" tr:nth-of-type(2) td.table_view_tablet").each(function() { id = $(this).attr('aria-describedby'); id = id.split("_"); jQuery("#"+grid).jqGrid('hideCol', [""+id[2]+""]); }); I'want to select all ceil with class "table_view_tablet" in the second line of table "grid" My HTML code is similar...

Jqgrid inline edit for selectList hits server for each row

jqgrid
i have set , editoptions: { aysnc: true, dataUrl: 'ControllerName/MethodName?__SessionKey=' + sessionkey + "&Id=" + Id, buildSelect: buildSelectFromJson, style: "width: calc(100% - 65px);", dataEvents: [ { type: 'change', fn: function (e) {} } ] } in which buildSelectFromJson returns select list in html. Now dataurl hits server for each row...

jqGrid Change the value of a field on beforeShowForm

jquery,jqgrid,jqgrid-php
I have a grid with a value in a predefined field, I want to do it is to click edit a row want to change the value of one of the fields in the FormEdit. The ColModel is: colModel:[ {name:'id',index:'ID', width:50, hidden:true, search:false, editable:false,resizable:false}, {name:'product',index:'product', align:"center", width:20, search:false, editable:false,resizable:false}, {name:'volume',index:'volume',...

jqGrid onDelete event handler

events,jqgrid,delete,handler,extend
I'm using a jqGrid with datatype: 'local'. The data of the grid is being set dynamically via addRowData. I don't use the asynchronous ajax stuff such as url + datatype: json because the grid has to display only client state. Now I want to use the jqGrid delete row functionality...

jqgrid change values of editable cell on change of another cell (dependent columns)

javascript,jquery,json,jqgrid
This is the grid. My discount column has an autocomplete which has values coming from another json variable. This is my json array where the data for discount is coming from. [ {"id":0.56,"label":"Adams Rite Less 50\/12","value":"Adams Rite Less 50\/12"}, {"id":0.44,"label":"ASSA Less 44","value":"ASSA Less 44"}, {"id":0.603,"label":"BARON ACCESSORIES AND STICKS Less 60.3","value":"BARON...

Line: 5571 Error: Not enough storage is available to complete this operation

javascript,jquery,jqgrid,internet-explorer-9
I am getting "Not enough storage is available to complete this operation." error while trying to add data (20K records) in jqGrid. This issue is occurring in IE 9. Code: //This line adds 20k records to the jqgrid $.when(GetDataBySelectedCode()) .done(function (ResultData) { if (ResultData!= null) {//able to get result here...

jqgrid - beforeSearch and afterSearch function are not triggered

javascript,jquery,jqgrid
I am trying to display a progress bar when user tries to filter data in jqgrid. But, the beforeSearch and afterSearch functions are not triggered. I tried to follow the documentation: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:toolbar_searching but, not sure what I am missing... Here is the fiddler: http://jsfiddle.net/14f3Lpnk/1/ <table id="list"></table> <div id="pager"></div> var mydata...

Select2 v4 in jqGrid edit modal window issue

twitter-bootstrap,jqgrid,jquery-select2-4
I know issue with jQueryUI modal window and Select2. I'm using this fix https://github.com/select2/select2/issues/1246#issuecomment-71710835. But currently I'm trying to integrate Select2 with jqGrid and its edit modal window and I noticed that input field loosing focus on keydown and no text is entered. I'm using latest build of Select2 v4.0.0....

jqGrid Partial Text Search Not Working

jqgrid
I need to display a table from an SQL database with the following columns: ID (integer, primary key) Name (varchar) I am using jqGrid 3.5.3. I am not allowed to update to a later version. When I use jqGrid to search in the Name column, the search function only returns...

Jqgrid grouping and bindKeys

jqgrid,free-jqgrid
I do not know if it's a bug or so should be. When using grouping and arrows up and down and selected row come to groupField, fails to pass over, jump to the last row .

Struts2 Jquery jqGrid beforeShowForm Example

jquery,jqgrid,struts2-jquery,struts2-jquery-plugin,struts2-jquery-grid
I'm looking for a way to use the beforeShowForm event when opening the edit dialog on a struts2-jquery grid. I want to be able to add custom fields to the edit dialog. <sjg:grid altRows="false" id="gridtable" dataType="json" editurl="%{editurl}" filter="true" filterOptions="{stringResult:true}" gridModel="gridModel" height="600" href="%{remoteurl}" loadonce="true" navigator="true" navigatorAdd="%{editPermission}" navigatorAddOptions="{reloadAfterSubmit:true,addCaption:'Add Record'}" navigatorDelete="false" navigatorEdit="%{editPermission}"...

jqGrid editoption values overriding selectoption values

jqgrid
I have the following column in my jqGrid: { name: 'Active', index: 'Active', width: '55', align: 'center', formatter: 'select', editable: true, edittype: "select", editoptions: { value: { "1": "Yes", "0": "No" }}, stype: 'select', searchoptions: { value: { "": "All", "1": "Yes", "0": "No" }} }, The problem is that...

The width parameter of the jqGrid edit modal breaks the other parameters

jqgrid,free-jqgrid
When I add width to the edit modal in jqGrid, the parameters after it (i.e., add:false, closeAfterEdit: true, etc.) stop working. I've tried it in different places, and it doesn't work. jQuery("#prodgrid").jqGrid('navGrid', '#pager', {width: 1000},{edit: true, add: false, del: false, search: false}, {closeAfterEdit: true}, {closeAfterAdd: true}); FYI: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script...

Struts2 jqGrid DatePicker in Column Filter

jquery,jsp,struts2,jqgrid,datepicker
I have a jsp running Struts2 jqGrid plugin. I have enabled the filter row at the top of the grid, one of the columns is a date column and I want to be able to change the textbox at the top of the column into a DatePicker. The id of...

Free jqGrid 4.8.0 - Hidding the 'of X' in the pager bar where it says 'page Y ox X'

jquery,jqgrid,free-jqgrid
In continues to this great answer, I'm looking got a way to remove the "of X" part that is part of the pager 'page Y of X'. So in case I'm working in a streaming mode, where I only know there is one more page ahead, without knowing how many...

How to use single click line editing in latest jqgrid

javascript,jquery,css,jqgrid,free-jqgrid
Single click inline row editing started from beforeSelectRow is not working in latest free jqgrid from github master. Clicking in row to start inline edit causes now exception Uncaught TypeError: Cannot read property 'rows' of undefined Line 16181 Column 45TypeError: Cannot read property 'rows' of undefined at showHideEditDelete Open this...

Jqgrid Drag and Drop is not working in tablet

javascript,jquery,jqgrid
I want to reorder my rows in jqgrid. I achieved this functionality using this example click here, I have checked that sample in tablet PC,it is not working in following browsers like IE,Safari,Chrome browsers,but works in FF. Do we have any general fix for this?...

Format jQgrid editable textbox height

css,jqgrid
I am using jQgrid version 4.6.0 (Free version) and trying to edit the height of textbox which gets rendered when we set editable: true in Column model. I want the textbox height to fit into complete grid cell. Here the width of rendered textbox is fine and fits in the...

Free jqGrid 4.8.0 - Set Locale automatically base on user environment

jquery,jqgrid,free-jqgrid
Is there a way I can set the user locale automatically based on the user windows/linux OS settings? Today I need to explicitly include the relevant js. Thanks,...

Condtional editable depend on the value in colModel jqGrid

jqgrid,jqgrid-php
I am trying to put editable value either true or false depend on the value of the cell in colModel. Is there is any way to do that? {name:'keywords',index:'keywords', width:150, editable:true,edittype:'select', editrules:{required: true}, editoptions:{value:{'one':'one','two':'two','three':'three','four':'four'},size:5} }, In this I want to set editable:false if the cellvalue exist else editable:true and editoptions:{value:{'one':'one','two':'two',...}...

How to get value of checked checkbox (in footer of jqgrid) and send to controller?

javascript,jquery,asp.net-mvc-4,checkbox,jqgrid
I have checkbox in footer of jqgrid and want to send value of checkbox to controller when click on button(Send Command). When a row is selected and click button send command, In addition to its value, the Check box is sent (selected or not selected) My code: .jqGrid('navButtonAdd', '#pager', {...

Doctrine returning datetime object instead of date string, jqGrid jsonmap not working

jquery,json,symfony2,doctrine2,jqgrid
I'm trying to display date in my jqgrid. But doctrine is returning a datetime object instead of a normal string type value which jqgrid can display. I can think of two possible solutions: (1) Change doctrine's return type to somehow return a string so that jqgrid can display it without...

jqGrid does not refresh with new data

jquery,jqgrid
I am getting json data from the server by passing in a page number n which should get the nth 100 rows. After loading it once, and pressing the "next page" button, it seems to get the new data correctly (I output the first object in the new data when...

Pass Id to a Onclick Function JQGrid

javascript,jquery,asp.net,jqgrid
I have a JQGrid.I need to take some Id to the OnClick function.In my scenario i wanted to get BasicId to the OnClick function. MyCode function grid() { //JqGrid $('#griddata').html('<table class="table" id="jqgrid"></table>') $('#jqgrid').jqGrid({ url: '/Admin/GetBasicData/', datatype: 'json', mtype: 'GET', //columns names colNames: ['BasicId','Images'], //columns model colModel: [ { name: 'BasicId',...

How to change free jqfrid font size of toolbar search box

jqgrid,free-jqgrid
I am able to change the font size of the cell content by using : .ui-jqgrid tr.jqgrow td { font-size: 1.2em; } But this does not change the font size of the text in the toolbar search box....

Unexpected behavior in jqGrid when trying to setRowData

javascript,jquery,jqgrid
I am working on a task where I need to update entire row data in jqgrid. Here is a sample fiddler: https://jsfiddle.net/99x50s2s/47/ In the above fiddler, please update a row and then try to scroll to the right. Code: var $thisGrid = jQuery("#sg1"); $thisGrid.jqGrid({ datatype: "local", gridview: true, loadonce: true,...

Free jqGrid 4.8.0 - getCell not working after last update

jquery,jqgrid,free-jqgrid
I have just download the latest and greatest sources from the Free-jqGrid GIT. Just replacing the old version I had yield an error, that after a debug found out to be an issue with the getCell function. The following: celValue = $('#'+gridName).jqGrid ('getCell', rowid, 'id'); ending up with celValue ="",...

AjaxSetup conflicting with jqgrid

javascript,jquery,ajax,jqgrid
I want to use ajaxsetup for all my ajax calls but it seems that it is interfering with my jqgrids on the site. Is there a way to globally setup my ajax calls without it messing up jqgrids internal calls. The below code is what i want to use on...

How to use body horizontal scrollbar in free jqgrid

jquery,html,css,jqgrid,free-jqgrid
Jqgrid from github does allow to use browser body element horizontal scrollbar if its properties autowidth: true, shrinkToFit: false, are used. To reproduce, open page below in chrome (created from sample in How to remove free jqgrid own horizontal scrollbar if autowidth:true is used ). Body element horizontal scrollbar is...

jqGrid - Add ms access like row navigation buttons

jquery,jqgrid
Are there any built in row navigation buttons in jqGrid which I can use? I tried looking on jqGrid Documentation and here on SO. Nothing seems to give me any solution even close. Example of what I want. EDIT The behaviour of these buttons would be like this. On pressing...

Validation of website on Jqgrid column

jqgrid
I am new with JqGrid and this is my JqGrid code. Now I want to make a website validation on column name "website". If any of you know the answer, kindly reply as soon as possible { name: 'website', index: 'website', search: false, editable: true } ...

Update a particular record in a table using struts2 and javascript

java,javascript,struts2,jqgrid,displaytag
How can I make the particular record editable and after changing the fields update to that particular record. I have never used JavaScript so I am facing a lot of perplexion between the javascript, struts 2 and hibernate. Following are the required material to help me out. I want to:...

JqGrid not able to bind JSON data with “dot”

javascript,jqgrid
I have a JSON response from server which I am trying to bind to JQgrid. However, the response is a JSON string has "dot" as a part of the object name. I am unable to get the JQGrid work with the "dot" Here is the sample fiddle for the problem...

jqGrid Add/Edit from navGrid not working

javascript,jqgrid
I've implemented a basic jqGrid table using jqGrid 4.5.2, I added 'add', 'edit', 'delete' buttons on navGrid. Using either 'add' or 'edit' buttons generates a modal where I add/edit values for a row. After clicking submit my controller is called successfully but no new row is added/edited inside the table....

In JQGrid, How can I dynamically get the column header label when validating a filtertoolbar field?

javascript,jqgrid,header,label
I have a jqGrid with the filtertoolbar option enabled. For a column or columns in the grid, I want to validate the column in some fashion, e.g., if an input field exceeds a certain length, display an alert. When I display an alert, I want to display the column header...

GridUnload - free Jqgrid

jqgrid,free-jqgrid
We've found when using GridUnload and grid load again, toolbar search is removed complete : This row is deleted complete. <tr role = "row" class = "ui-toolbar-search" style = "display: table-row;"> ...

jqGrid Enter key before save handler

jqgrid
I am using jqGrid 3.8.1 with inline edit mode. Users are currently allowed to hit the Enter key in order to save a row. I would like to let them continue to do this, but I need to do some data validation (including a call to the server) before they...

Call WebMethod from jqGrid

jquery,asp.net,jqgrid,webmethod
I am learning jqGrid and following this link. However demo is build in Asp.Net MVC and I am trying it using Asp.Net WebForms. My debugger is not stepping in into WebMethod Here is my code $("#tblDemo").jqGrid( { url: 'Default.aspx/GetGridData', datatype: "json", mtype: 'GET', colNames: ['Id', 'First Name', 'Last Name'], colModel:...

jqgrid row height expanding when adding both icon and text

javascript,html,css,jqgrid
Im Using jqgrid and I want an anchor tag which links to a page with current row id. The icon and text appear in seperate line how do I get them into the same line Code: function addLink(cellvalue, options, rowObject){ return "<a href=detail_view.html?id="+ options.rowId +"><div class='ui-icon ui-icon-search'></div>asdas</a>"; }; ...

how to avoid “SyntaxError: Octal literals are not allowed in strict mode” message with jqGrid filterloader

jqgrid
In jqGrid filter toolbar, When i search a numeric value on a numeric valued column with leading zero such as 01, 02, 00 etc, then SyntaxError: Octal literals are not allowed in strict mode message is coming. Please help me out....

Align an icon vertically in jqGrid pager

jquery,css,jqgrid
I have place a 24x24 png into the left pager of the jqgrid using the jquery code below. Also I'm applying vertical-align middle. $("#pager_left").append ( '<td><div><img alt="" id="imgprint" src="images/word24x24.png"/></div></td>'); $("#imgprint").css('vertical-align', 'middle'); The resulting html code captured from chrome developer tools is The computed pager_left size is 214x28 + 1px padding...

Filter rows after adding new record in JQgrid

javascript,jquery,json,jqgrid
the senario is this: My script adds a new record with "setInterval" function every second: $("#grid").jqGrid('addRowData', id, data, 'first').trigger("reloadGrid"); assume while this script is adding new records, user apply some filters but the filter doesn't apply on the new coming records indeed its just work on records that were added...

Free Jqgrid and custom formater checkbox

jqgrid,free-jqgrid
When i click at last column checkbox, nothing happens. //$.fn.jqm = false; $.jgrid.jqModal = $.jgrid.jqModal || {}; $.extend(true, $.jgrid.jqModal, {toTop: true}); $("#Ecran").dialog({ //dialogClass: 'Ecran', autoOpen: false, width: 560, height: 370, modal: true, open: function (event, ui) { $("#jqGrid").jqGrid({ url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders', mtype: "GET", datatype: "jsonp", colModel: [ { label: 'OrderID', name:...

How to make editable:false for jqgrid cell in INLINE edit?

javascript,jquery,jqgrid,jqgrid-inlinenav
I tried this to make cell non editable as per condition but don't know where to place this code, in $( document ).ready(function() or in onSelectRow : function(rowid, status, e) and what are the meanings of the parameters passed to that function? I'm newbie in Jquery. Let me know if...

jqgrid: Sorting not working after dynamically adding records

javascript,jquery,jqgrid
I have a jqgrid which initially gets populated with some records. User has the option to add more rows to the grid. But, after adding new rows, if user tries to sort the records, the result is inconsistent and some of the records are lost in the grid. Fiddler: https://jsfiddle.net/99x50s2s/68/...

JQGrid remove cell value from custom error message in inline editing

jqgrid,inline-editing
I am new to JQGrid. I want to customize validation while inline editing in jqgrid for that i have used editrules: { custom: true, custom_func: functionabc}. This displays validation message as [Cell Value] This is test validation. How to avoid displaying "Cell value" in alert?...

UI dialog and free-jqgrid

jqgrid,free-jqgrid
Oleg, please check again http://jsfiddle.net/9ezy09ep/11/ When number of rows is large, scroll horizontal is positioned incorrectly. Another problem is with bindKeys. jQuery("#intrari").jqGrid('bindKeys', {"onEnter":function( rowid ){ }}); ...

How to increase font size and element height if free jqgrid form edit

jquery,css,twitter-bootstrap,jqgrid,free-jqgrid
How to increase font and editing elements sizes in free jqgrid edit and add forms so that they have same sizes as in bootstrap. Twitter bootstrap allows to create good editing elements with active element hightligh using form-group and form-control classes like <div class="form-group"> <label for="Kellaaeg">Kell</label> <input class="form-control" id="Kellaaeg" name="Kellaaeg">...

Displaying bootstrap icon along with jqgrid caption text

javascript,jquery,css,twitter-bootstrap,jqgrid
I am trying to display twitter bootstrap icon in the jqgrid caption section but, the icon is not displaying. Here is the fiddler: https://jsfiddle.net/99x50s2s/31/ Code Tried: jQuery("#sg1").jqGrid({ datatype: "local", gridview: true, loadonce: true, shrinkToFit: false, autoencode: true, height: 'auto', viewrecords: true, sortorder: "desc", scrollrows: true, loadui: 'disable', colNames:['Inv No','Date', 'Client',...

JqGrid - Using formatDisplayField Option

javascript,jquery,jqgrid
I'm with a problem using jqgrid with some options, better that write is show you an image: So, when I'm construction the table body (with ajax call) I'm passing an hidden field. When something is grouped, I want to show that hidden field where 'undefined' word is (group title). Is...

gridname.getGridParam('selrow') is null

jquery,jqgrid
I have the code below. Please let me know how i can get the selected row data in jqGrid. I tried using the below code: function getlist() { var grid = $("#gridname"); var rowKey = grid.getGridParam('selrow'); if (rowKey) alert("Selected row primary key is: " + rowKey); else alert("No rows are...

JqGrid Performance - setRowData lags

performance,jqgrid
setRowData takes almost 5 seconds when the grid has 300 rows, 30 cols, and 4 frozen cols. $("#tbl").jqGrid({ gridview: true, url: '../controller/GetData', datatype: "json", rowNum: pageSize, viewrecords: true, loadtext: '', loadui: 'disable', rowList: [1000, 2000, 3000], width: $(window).width() - LeftMargin, shrinkToFit: false, pager: '#dvPager', pagerpos: 'left', colNames: GetColNames(selectedViewName, viewCols), colModel:...

Free jQGrid 4.8.0 - Paint The Column header based on sort/filter

jquery,jqgrid,free-jqgrid
I'm having a grid with the ability to sort/filterbar turn on. I would like to change the color of the filterbar or sort for that column only when these are in use - kind of giving the user an indication about the fact those column are filtered. This is what...