jqGrid Not Loading Data

The answer of Paul is absolutely correct. You should just use jsonReader : {repeatitems: false}. I decide to write some more additional information only to clear why jqGrid could not read your original data at the beginning. I want additionally describe how jsonReader parameter can help to read JSON or XML data returned from the … Read more

JQgrid checkbox onclick update database

You can set a click event handler inside of loadComplete: loadComplete: function () { var iCol = getColumnIndexByName ($(this), ‘Aktiv’), rows = this.rows, i, c = rows.length; for (i = 1; i < c; i += 1) { $(rows[i].cells[iCol]).click(function (e) { var id = $(e.target).closest(‘tr’)[0].id, isChecked = $(e.target).is(‘:checked’); alert(‘clicked on the checkbox in the row … Read more

Jqgrid Tree View Adjacencey

You code small simple errors, but the main problem which you have is that your code are made to add simple rows and not tree nodes. You can go on the official demo page and choose under “New in version 3.4” the demo “Tree Grid Adjacency model”. I wrote the demo which work exactly like … Read more

How to get a jqGrid cell value when editing

General function to get value of cell with given row id and cell id Create in your js code function: function getCellValue(rowId, cellId) { var cell = jQuery(‘#’ + rowId + ‘_’ + cellId); var val = cell.val(); return val; } Example of use: var clientId = getCellValue(15, ‘clientId’); Dodgy, but works.

postData not passing any parameters!

You current implementation of serializeGridData just remove all functions parameters from the postData. So you should either extend data parameter inside of serializeGridData instead of the usage of postData. Another way is to modify serializeGridData to the following: serializeGridData: function (data){ var propertyName, propertyValue, dataToSend = {}; for (propertyName in data) { if (data.hasOwnProperty(propertyName)) { … Read more

Custom jQGrid post action

I updated the demo for you. Now the http://ok-soft-gmbh.com/jqGrid/TestSamle/Admin1.htm do what you need. (I removed from the code the second grid to hold the code smaller): Some comments to the implementation. The actions formatter add “action buttons” elements inside a div. Every “action button” has the HTML markup like the following <div style=”margin-left: 5px; float: … Read more

Add toolbar in the bottom of the header using jqgrid

Probably you misunderstood toolbar parameter of the jqGrid. Perhaps you want use Navigator having cloneToTop: true which works if you define additionally toppager: true jqGrid option. This option clone the pager div on the top of the jqGrid. After this one can easy remove some elements from the top or bottom “toolbar”: jQuery(“#list”).jqGrid({ // some … Read more

jqGrid client-side searching

You should implement search for single field in a little another way: var grid = jQuery(“#Grid2″); var postdata = grid.jqGrid(‘getGridParam’,’postData’); jQuery.extend (postdata, {filters:”, searchField: ‘error_column’, searchOper: ‘eq’, searchString: ‘Test’}); grid.jqGrid(‘setGridParam’, { search: true, postData: postdata }); grid.trigger(“reloadGrid”,[{page:1}]); You can see live example here. UPDATED: You use loadonce: true and datatype: “local” together. The value loadonce: … Read more