jqGrid dynamic column binding

Try this in document.ready: $.ajax( { type: “POST”, url: “SomeUrl/GetColumnsAndData”, data: “”, dataType: “json”, success: function(result) { colD = result.colData; colN = result.colNames; colM = result.colModel; jQuery(“#list”).jqGrid({ jsonReader : { cell: “”, id: “0” }, url: ‘SomeUrl/Getdata’, datatype: ‘jsonstring’, mtype: ‘POST’, datastr : colD, colNames:colN, colModel :colM, pager: jQuery(‘#pager’), rowNum: 5, rowList: [5, 10, 20, … Read more

html link column in jqGrid

Here’s the sample colModel configuration from Craig’s link to jqGrid formatting help. It specifies the formatter as showLink and the url and params are specified with formatoptions. colModel: [ {name:’myname’, edittype:’select’, formatter:’showlink’, formatoptions:{baseLinkUrl:’someurl.php’, addParam: ‘&action=edit’}

jqGrid horizontal scrollbar

i adjusted ui.grid.css because i did not need a horizontal scrollbar at all. i did this: .ui-jqgrid .ui-jqgrid-bdiv { position: relative; margin: 0em; padding:0; /*overflow: auto;*/ overflow-x:hidden; overflow-y:auto; text-align:left; } the commented was how it was, i just used overflow-x to hide the horizontal scrollbar and now all is fine with me.

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.

SlickGrid Vs JQGrid [closed]

I looked at jqGrid and SlickGrid and found that SlickGrid is much more elegantly written; less configuration is needed for most use-cases for SlickGrid; jqGrid, however, need less configuration to set up the more complex cases (such as virtual scrolling); jqGrid might have better documentation but the server-side connection part for jqGrid is covered by … Read more

can jqgrid support dropdowns in the toolbar filter fields

There are some common rules for all types of sorting in jqGrid { name: ‘Category’, index: ‘Category’, width: 200, formatter:’select’, stype: ‘select’, searchoptions:{ sopt:[‘eq’], value: categoriesStr } } where categoriesStr are defined as var categoriesStr = “:All;1:sport;2:science”; Here additionally to the standard “1:sport;2:science” values are inserted “:All” string which allow you don’t filter the the … Read more

How to get a jqGrid selected row cells value

First you can get the rowid of the selected row with respect of getGridParam method and ‘selrow’ as the parameter and then you can use getCell to get the cell value from the corresponding column: var myGrid = $(‘#list’), selRowId = myGrid.jqGrid (‘getGridParam’, ‘selrow’), celValue = myGrid.jqGrid (‘getCell’, selRowId, ‘columnName’); The ‘columnName’ should be the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)