Search Results

Search found 314 results on 13 pages for 'jqgrid'.

Page 7/13 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Callback for When jqGrid Finishes Reloading?

    - by James
    Hi, I am using the jqGrid plug-in and at one point I need to refresh the grid and set the selected row to match the record that I am showing in detail on another section of the page. I have the following code but it does not work: $("#AllActions").trigger("reloadGrid").setSelection(selectedRow); The selectedRow parameter comes from an event handler that gets called when the data is changed and the grid needs to be updated. I'm pretty sure that the problem is that the grid is not loaded when the selection is being set, because if I put a call to alert() between the calls to trigger() and setSelection(), it works. I would be grateful for any advice. [Edit]Looks like http://stackoverflow.com/questions/2529581/jqgrids-setselect-does-not-work-after-reloadgrid is related but did not get resolved.[/Edit]

    Read the article

  • POST Ajax call results in not found using jqGrid and ASP.NET MVC 2 on IIS6

    - by Dan
    This is puzzling me. I deployed an MVC 2 application to IIS6 and everything works fine except for my jqGrid calls to get data. All is well on my development machine, but here are the two URLs I'm working with Local dev web server: POST http://localhost:port/Ctrl.mvc/JsonMethod IIS6 (notice https - not sure if that matters) POST https://www.domain.com/AppName/Ctrl.mvc/JsonMethod The latter URL results in a HTTP 404, which is really confusing as all works well on my local machine. The JsonMethod is properly declared with [AcceptVerbs(HttpVerbs.Post)] Let me know if any more info is needed - I appreciate any and all help with this!

    Read the article

  • jqgrid Posting name:value pair when deleting row?

    - by user837168
    I want to send some name:value pair from the row selected along with del command. from below script I want to send the "polpono" value to my php script when del command is issued. any help will be highly appreciated. $(document).ready(function(){ $("#datagrid").jqGrid({ url:'actionpo.php?vid=polpogridjq', datatype: 'xml', mtype: 'GET', colNames:['List#','PO#', 'Item Code','Item Detail','Qty','Price','Tax'], colModel :[ {name:'polistno', width:100,editable:true,editable:true,key:true}, {name:'polpono',index:'polpono', width:100,editable:true}, {name:'politemcode',index:'politemcode', width:100, align:'right',sortable:true,editable:true}, {name:'politemname', width:300, align:'left',sortable:false,editable:true}, {name:'politemqty',width:50, align:'right',sortable:false,editable:true}, {name:'politemvalue', width:80,align:'left',sortable:false,editable:true}, {name:'politemtax', width:50, align:'right',editable:true} ], pager: $('#pager'), rowNum:10, rowList:[10,20,30], sortname: 'polpono', sortorder: 'desc', shrinkToFit: false, rownumbers: false, multiselect: false, viewRecords: false, clearAfterAdd:true, caption: 'Itemised Quantity', editurl: "actionpo.php?vid=gridformcall", }).navGrid('#pager', { edit: true, add: true, del: true ,search:false, refresh:true},{ } }); });

    Read the article

  • JQGrid: Dynamically set a cell to uneditable based on content

    - by Shawn
    I'm having some issues getting some cells (with cellEdit: true) to be non-editable even though the column is set to editable. I've tried many ways, like beforeEditCell, formatters, etc. None seem to work. The closest I've got is by setting a formatter to the column that I'd like to be editable and then using setCell to set the 'not-editable-cell' class (snippet below). The first time you click the cell, it unfortunately goes into edit mode, but if you click elsewhere and try to re-edit the cell, it's successfully uneditable. I've also tried using the same snipped but inside of beforeEditCell, it successfully stops the cell from being edited but in turn 'freezes' the grid. You can no longer select any other cell. function noEditFormatter(cellValue, options, rowObject) { if (cellValue == 'test') jQuery("#grid").jqGrid('setCell', options.rowId, 'ColName', '', 'not-editable-cell'); return cellValue; } Any help would be much appreciated.

    Read the article

  • Possible to make jqGrid stretch to 100%?

    - by Earlz
    Is it possible to make it so that a jqGrid will have a width set to 100%? I understand that column widths must be an absolute pixel size, but I've yet to find anything for setting the width of the actual grid to a relative size. For instance, I want to set the width to 100%. Instead of 100% it seems to use an odd size of 450px. There is more horizontal room on the page, but with the columns width and such, it will make the container(of only the grid) horizontally scroll. Is there some way around this?

    Read the article

  • jqGrid custom formatter

    - by great_llama
    For one of the columns in my jqGrid, I'm providing a custom formatter function. I'm providing some special cases, but if those conditions aren't met, I'd like to resort to using the built-in date formatter utility method. It doesn't seem that I'm getting the right combination of $.extend() to create the options that method is expecting. My colModel for this column: { name:'expires', index:'7', width:90, align:"right", resizable: false, formatter: expireFormat, formatoptions: {srcformat:"l, F d, Y g:i:s A",newformat:"n/j/Y"} }, And an example of what I'm trying to do function expireFormat(cellValue, opts, rowObject) { if (cellValue == null || cellValue == 1451520000) { // a specific date that should show as blank return ''; } else { // here is where I'd like to just call the $.fmatter.util.DateFormat var dt = new Date(cellValue * 1000); var op = $.extend({},opts.date); if(!isUndefined(opts.colModel.formatoptions)) { op = $.extend({},op,opts.colModel.formatoptions); } return $.fmatter.util.DateFormat(op.srcformat,dt,op.newformat,op); } } (An exception is being thrown in the guts of that DateFormat method, looks like where it's trying to read into a masks property of the options that get passed in) EDIT: The $.extend that put everything in the place it needed was getting it from that global property where the i18n library set it, $.jgrid.formatter.date. var op = $.extend({}, $.jgrid.formatter.date); if(!isUndefined(opts.colModel.formatoptions)) { op = $.extend({}, op, opts.colModel.formatoptions); } return $.fmatter.util.DateFormat(op.srcformat,dt.toLocaleString(),op.newformat,op);

    Read the article

  • jqGrid dynamic select option

    - by Jo
    I'm creating a jqgrid with drop down columns and I'm using cell editing. I need the options of the drop down columns to change dynamically and I've tried implementing this by setting the column to be: { name: "AccountLookup", index: "AccountLookup", width: 90, editable: true, resizable: true, edittype: "select", formatter: "select" }, and then in the beforeCellEdit event I have: beforeEditCell: function(id, name, val, iRow, iCol) { if(name=='AccountLookup') { var listdata = GetLookupValues(id, name); if (listdata == null) listdata = "1:1"; jQuery("#grid").setColProp(name, { editoptions: { value: listdata.toString()} }) } }, GetLookupValues just returns a string in the format "1:One;2:Two" etc. That works fine however the options are populated one click behind - ie i click on AccountID in row 1, and the dropdown is empty, however when I then click on AccountID in row 3 the options I set in the row 1 click are shown in the row 3 click. And so on. So always one click behind. Is there another way of achieving what I need? Bacially the dropdown options displayed are always changing and I need to load them as user enters the cell for editing. Perhaps I can somehow get at the select control in the beforeEditCell event and manually enter its values instead of using the setColProp call? If so could I get an example of doing that please? Another thing - if the dropdown is empty and a user doesn't cancel the cell edit, the grid script throws an error. I'm using clientarray editing if that makes a difference. Greatly appreciate any help. Regards, Jo

    Read the article

  • Problem with jqGrid in Internet Explorer 8

    - by Dave Swersky
    I have developed an ASP.NET MVC (version 2 RC) application with a ton of jqGrids. It's working like a champ in Firefox, but I've discovered a problem in IE8. The "Main View" grids can be filtered by a search box or one of a few dropdowns above the grid. I use some javascript to reset the url for the grid, then trigger a reload, thusly: function filterByName(filter) { if (filter == 'All') { $('#list').setGridParam({ url: 'Application/GetApplications' }); $('#list').trigger("reloadGrid"); } else { $('#list').setGridParam({ url: 'Application/GetAppByName/' + filter + '/' }); $('#list').trigger("reloadGrid"); } } This works like magic in Firefox, but I'm getting an HTTP 400 Bad Request when I do this in IE8. The IE8 client-side debugger is like flint and tinder compared to Firebug's flamethrower, so I'm not having much luck figuring out why it breaks in IE8. Has anyone seen this? Also, the jqGrid "trigger" method here is swallowing the AJAX exception. Is there a way to get it to bubble up so I can get to the exception details? UPDATE: The problem was with the syntax in my "onchange" event for the dropdowns. I was using: onchange="filterByMnemonic($('#drpMnemonic')[0].value); Which Firefox apparently doesn't mind but IE sees that as nuthin'. This, however, works in both browsers: onchange = "filterByMnemonic($('#drpMnemonic > option:selected').attr('value'));"

    Read the article

  • jqGrid local data manipulation; problem with row ids when deleting and adding new rows

    - by Sam
    I'm using jqGrid as a client side grid input, allowing the user to input multiple records before POSTing all the data back at once. I'm having a problem where if the user has added a few records (say 3 ) the id's for the records will be 1,2,3. if the user deletes record 2, you're left with 1 and 3 for the id of the records. When the user now adds a new records, jqGrid assigns that records the id 3 again since it just seems to count the total records and increments it by one for the new record. This causes problems when selecting rows as now the row id's are 1, 3 and 3. Does anyone know how to access the row ids of records as I could probably use the afterSubmit event and reassign the row id's increasing from 1. ( so after i delete row id 2, this will set the other row id's to 1 and 2) Any other suggestions to solve this problem? Thanks edit I've solved this with the following code for the delete navGrid button }).navGrid('#pager', {add:true, del:true, refresh:false, search:false}, { ... }, ##edit parameters { ... }, ##add parameters {reloadAfterSubmit:false, clearAfterAdd:false, afterComplete: function () { ## clear and readd the row data so the row ids are sequential var savedData= $("#inputgrid").jqGrid('getRowData'); $("#inputgrid").jqGrid('clearGridData'); $("#inputgrid").jqGrid('addRowData', 'rn', savedData); } } ##delete parameters ); Basically just saving the grid data and then re-adding it so that the rowids are sequential again. For some reason it causes the row numbers down the left side to go start from 2 instead of one. Edit this was solved by using the latest jqGrid code in GitHub (27th April 2010)

    Read the article

  • jqGrid > datatype : "local" > get and save (at once) all edited cells of a column ?

    - by Qualliarys
    Hi, i have a grid with a datatype = "local". The data are an array as follows : var mydata = [{id:1,valeur:"a_value",designation:"a_designation"}, {id:2,...}, ...]; The second column (named valeur) is the only editable column of the grid (editable:true set in colModel) In the pager of the grid, i have 2 buttons. One to edit all cells (at once) of the column named valeur: $("#mygrid").jqGrid('navButtonAdd','#pager',{caption:"Edit values", onClickButton:function(){ var ids = $('#mygrid').jqGrid('getDataIDs'); for(var i=0;i<ids.length+1;i++){ $('#mygrid').jqGrid('editRow',ids[i],true);} }}); and another one to save (at once) all the changes of the edited cells: $("#mygrid").jqGrid('navButtonAdd','#pager',{caption:"Save changes", onClickButton:function(){var ids = $('#mygrid').jqGrid('getDataIDs'); for(var i=0;i<ids.length+1;i++){ ... ??? ... }}}); when i use : var rd = $("#mygrid").jqGrid('getRowData',ids[i]); alert("valeur="+rd.valeur); for each display i get something like that: valeur=< input class="editable" role="textbox" name="valeur" id="1_valeur" style="width: 98%;" type="text" ... So, when cells are in edition mode, all rd.valeur are an input text tag ! when they are not, i get the initials values of the cells ! How to get and save all changes of this column (all cells in edition mode)?

    Read the article

  • jqGrid - customizing the multi-select option (restrict single selection and adding custom events)

    - by Renso
    Goal: Using the jgGrid to enable a selection of a checkbox for row selection - which is easy to set in the jqGrid - but also only allowing a single row to be selectable at a time while adding events based on whether the row was selected or de-selected. Environment: jQuery 1.4.4 jqGrid 3.4.4a Issue: The jqGrid does not support the option to restrict the multi-select to only allow for a single selection. You may ask, why bother with the multi-select checkbox function if you only want to allow for the selection of a single row? Good question, as an example, you want to reserve the selection of a row to trigger another kind of event and use the checkbox multi-select to handle a different kind of event; in other words, when I select the row I want something entirely different to happen than when I select to check off the checkbox for that row. Also the setSelection method of the jqGrid is a toggle and has no support for determining whether the checkbox has already been selected or not, So it will simply act as a switch - which it is designed to do - but with no way out of the box to only check off the box (as in not to de-select) rather than act like a switch. Furthermore, the getGridParam('selrow') does not indicate if the row was selected or de-selected, which seems a bit strange and is the main reason for this blog post. Solution: How this will act: When you check off a multi-select checkbox in the gird, and then commence to select another row by checking off that row's multi-select checkbox - I'm not talking there about clicking on the row but using the grid's multi-select checkbox - it will de-select the previous selection so that you are always left with only a single selection. Furthermore, once you select or de-select a multi-select checkbox, fire off an event that will be determined by whether or not the row was selected or de-selected, not just merely clicked on. So if I de-select the row do one thing but when selecting it do another. Implementation (this of course is only a partial code snippet):             multiselect: true,             multiboxonly: true,             onSelectRow: function (rowId) {                 var gridSelRow = $(item).getGridParam('selrow');                 var s;                 s = $(item).getGridParam('selarrrow');                 if (!s || !s[0]) {                     $(item).resetSelection();                     $('#productLineDetails').fadeOut();                     lastsel = null;                     return;                 }                 var selected = $.inArray(rowId, s) != -1;                 if (selected) {                     $('#productLineDetails').show();                 }                 else {                     $('#productLineDetails').fadeOut();                 }                 if (rowId && rowId !== lastsel && selected) {                     $(item).GridToForm(gridSelRow, '#productLineDetails');                     if (lastsel) $(item).setSelection(lastsel, false);                 }                 lastsel = rowId;             }, In the example code above: The "item" property is the id of the jqGrid. The following to settings ensure that the jqGrid will add the new column to select rows with a checkbox and also the not allow for the selection by clicking on the row but to force the user to have to click on the multi-select checkbox to select the row: multiselect: true, multiboxonly: true, Unfortunately the var gridSelRow = $(item).getGridParam('selrow') function will only return the row the user clicked on or rather that the row's checkbox was clicked on and NOT whether or not it was selected nor de-selected, but it retrieves the row id, which is what we will need. The following piece get's all rows that have been selected so far, as in have a checked off multi-select checkbox: var s; s = $(item).getGridParam('selarrrow'); Now determine if the checkbox the user just clicked on was selected or de-selected: var selected = $.inArray(rowId, s) != -1; If it was selected then show a container "#productLineDetails", if not hide that container away. The following instruction populates a form with the grid data using the built-in GridToForm method (just mentioned here as an example) ONLY if the row has been selected and NOT de-selected but more importantly to de-select any other multi-select checkbox that may have been selected: if (rowId && rowId !== lastsel && selected) {                     $(item).GridToForm(gridSelRow, '#productLineDetails');                     if (lastsel) $(item).setSelection(lastsel, false); }

    Read the article

  • Preventing the opening of a form on a add button click

    - by Jonathan
    Hey guys, Did you guys know how to prevent the open of a Form when I click on a add button? Maybe using beforeShowForm? function(formid) { if(jQuery('#gridap').getGridParam('selrow')) { idgridap=jQuery('#gridap').getGridParam('selrow'); jQuery('#FK_numerocontrato_ap',formid).val(idgridap).attr('readonly','readonly'); } else { // I want to prevent the openning of the add form here and maybe show an alert using the "alertcap" } } CHECAROW; $grid->setNavEvent('add','beforeShowForm',$checarowid); BTW, there's a way to call the alertmod of jqgrid and add a custom message to it? tks!

    Read the article

  • Preventing the opening of a form on an ad

    - by Jonathan
    Hey guys, Did you guys know how to prevent the open of a Form when I click on a add button? Maybe using beforeShowForm? function(formid) { if(jQuery('#gridap').getGridParam('selrow')) { idgridap=jQuery('#gridap').getGridParam('selrow'); jQuery('#FK_numerocontrato_ap',formid).val(idgridap).attr('readonly','readonly'); } else { // I want to prevent the openning of the add form here and maybe show an alert using the "alertcap" } } CHECAROW; $grid->setNavEvent('add','beforeShowForm',$checarowid); BTW, there's a way to call the alertmod of jqgrid and add a custom message to it? tks!

    Read the article

  • jqGrid multiplesearch - How do I add and/or column for each row?

    - by jimasp
    I have a jqGrid multiple search dialog as below: (Note the first empty td in each row). What I want is a search grid like this (below), where: The first td is filled in with "and/or" accordingly. The corresponding search filters are also built that way. The empty td is there by default, so I assume that this is a standard jqGrid feature that I can turn on, but I can't seem to find it in the docs. My code looks like this: <script type="text/javascript"> $(document).ready(function () { var lastSel; var pageSize = 10; // the initial pageSize $("#grid").jqGrid({ url: '/Ajax/GetJqGridActivities', editurl: '/Ajax/UpdateJqGridActivities', datatype: "json", colNames: [ 'Id', 'Description', 'Progress', 'Actual Start', 'Actual End', 'Status', 'Scheduled Start', 'Scheduled End' ], colModel: [ { name: 'Id', index: 'Id', searchoptions: { sopt: ['eq', 'ne']} }, { name: 'Description', index: 'Description', searchoptions: { sopt: ['eq', 'ne']} }, { name: 'Progress', index: 'Progress', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ActualStart', index: 'ActualStart', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ActualEnd', index: 'ActualEnd', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'Status', index: 'Status.Name', editable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'ScheduledStart', index: 'ScheduledStart', searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ScheduledEnd', index: 'ScheduledEnd', searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} } ], jsonReader: { root: 'rows', id: 'Id', repeatitems: false }, rowNum: pageSize, // this is the pageSize rowList: [pageSize, 50, 100], pager: '#pager', sortname: 'Id', autowidth: true, shrinkToFit: false, viewrecords: true, sortorder: "desc", caption: "JSON Example", onSelectRow: function (id) { if (id && id !== lastSel) { $('#grid').jqGrid('restoreRow', lastSel); $('#grid').jqGrid('editRow', id, true); lastSel = id; } } }); // change the options (called via searchoptions) var updateGroupOpText = function ($form) { $('select.opsel option[value="AND"]', $form[0]).text('and'); $('select.opsel option[value="OR"]', $form[0]).text('or'); $('select.opsel', $form[0]).trigger('change'); }; // $(window).bind('resize', function() { // ("#grid").setGridWidth($(window).width()); //}).trigger('resize'); // paging bar settings (inc. buttons) // and advanced search $("#grid").jqGrid('navGrid', '#pager', { edit: true, add: false, del: false }, // buttons {}, // edit option - these are ordered params! {}, // add options {}, // del options {closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, onInitializeSearch: updateGroupOpText, afterRedraw: updateGroupOpText}, // search options {} ); // TODO: work out how to use global $.ajaxSetup instead $('#grid').ajaxError(function (e, jqxhr, settings, exception) { var str = "Ajax Error!\n\n"; if (jqxhr.status === 0) { str += 'Not connect.\n Verify Network.'; } else if (jqxhr.status == 404) { str += 'Requested page not found. [404]'; } else if (jqxhr.status == 500) { str += 'Internal Server Error [500].'; } else if (exception === 'parsererror') { str += 'Requested JSON parse failed.'; } else if (exception === 'timeout') { str += 'Time out error.'; } else if (exception === 'abort') { str += 'Ajax request aborted.'; } else { str += 'Uncaught Error.\n' + jqxhr.responseText; } alert(str); }); $("#grid").jqGrid('bindKeys'); $("#grid").jqGrid('inlineNav', "#grid"); }); </script> <table id="grid"/> <div id="pager"/>

    Read the article

  • How to filter the jqGrid data NOT using the built in search/filter box

    - by Jimbo
    I want users to be able to filter grid data without using the intrinsic search box. I have created two input fields for date (from and to) and now need to tell the grid to adopt this as its filter and then to request new data. Forging a server request for grid data (bypassing the grid) and setting the grid's data to be the response data wont work - because as soon as the user tries to re-order the results or change the page etc. the grid will request new data from the server using a blank filter. I cant seem to find grid API to achieve this - does anyone have any ideas? Thanks.

    Read the article

  • jqGrid Coloring an entire line in Grid based upon a cells value

    - by Thomas
    Hi all, i know it's been asked before but i cant get it to run and i'm out of things to try. So i want to colorize a row in a Grid if its value is not 1 - i use a custom formatter for this. The formatter itself works, thats not the problem. I've tried multple ways I've found so far on the web - adding a class, directly adding css code, using setRowData, using setCell.... Here are my examples - none of them worked for me (linux, ff363) - any pointer would be gratly appreciated. 27.05.2010_00:00:00-27.05.2010_00:00:00 is my row id <style> .state_inactive { background-color: red !important; } .state_active { background-color: green !important; } </style> function format_state (cellvalue, options, rowObject) { var elem='#'+options.gid; if (cellvalue != 1) { jQuery('#list2').setRowData(options.rowID,'', {'background-color':'#FF6F6F'}); jQuery('#list2').setRowData('27.05.2010_00:00:00-27.05.2010_00:00:00', '',{'background-color':'#FF6F6F'}); for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_inactive',''); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'','state_inactive'); jQuery(elem).setCell('"'+options.rowId+'"',cnt,'5', {'background-color':'#FF6F6F'},''); } } else { for (var cnt=0;cnt<rowObject.length;cnt=cnt+1) { jQuery(elem).setCell(options.rowId,cnt,'','state_active',''); } } <!-- dont modify, we simply added the class above--> return cellvalue; } Thanks, Thomas

    Read the article

  • Jquery JQGrid breaks when contentType=application/json?

    - by JK
    I've had to use $.ajaxSetup() to globally change the contentType to application/json $.ajaxSetup({ contentType: "application/json; charset=utf-8" }); (See this question for why I had to use application/json http://stackoverflow.com/questions/2792603/aspnet-mvc-why-is-modelstate-isvalid-false-the-x-field-is-required-when-that) But this breaks the jquery jqrid with this error: Invalid JSON primitive: _search The POST data it is trying to send is: _search=false&nd=1274042681880&rows=20&page=1&sidx=&sord=asc Which of is not in json format, so of course it fails. Is there anyway to tell jqrid what contenttype to use? I have searched on the jqrid wiki, but doesn't have much documentation about anything really. http://www.trirand.com/jqgridwiki/doku.php?do=search&id=contenttype&fulltext=Search

    Read the article

  • JQgrid : specific value from a selected row

    - by bsreekanth
    Hello, how to get a value of a (hidden) column, from the selected row. that is, the cell value needs to be from the cell identied by colName, and the selected row (not using multi select). From the API i see the method getGridParam("selrow") for reading the row, may be able to combine with other methods.. but, any convenient method available? a code snippet would save lot of time... \ thanks.

    Read the article

  • Display nice error message when there is something wrong after ajax request jqgrid

    - by Niels Ilmer
    Hello, I delete rows with this function: function deleteRow(){ rows = jQuery("#category_grid").getGridParam('selarrrow'); if( rows.length>0){ jQuery('#category_grid').delGridRow(rows,{ msg:'Verwijderen geselecteerde rijen?' }); }else{ alert("Selecteer eerst een rij om te verwijderen!"); } } but when it's fails in my php, server side and a exception is thrown. The errormessage looks not nice. How can i show errotext in the dialog box? or catch an error message after an ajax call? At the moment the error message looks like: error Status: 'CDbException'. Error code: 500 When i googled i found a event of the delGridRow function called errorTextFormat. Is this the event where i'm looking for? Can someone please give me an example of the implementation of this event? greetings niels

    Read the article

  • what is jqgrid footer json format

    - by Dennis
    hi. i am currently trying to solve my problem with the total in the footer. i tried searching in the internet with some examples, but they are using php, and i am using java. can you please show me what exactly the json looks like for this php script $response-userdata['total'] = 1234; $response-userdata['name'] = 'Totals:'; is this what it looks like? {"total":0,"userdata":[{"total":1234,"name":"Totals"}],"page":0,"aData":..... thanks.

    Read the article

  • jqGrid - how to change title based on colModel sortable property

    - by Greg
    When the mouse hovers over each column I'd like the tooltip to indicate whether that column is sortable. I am able to change the title attribute with something like this: $("#List .ui-th-column").each(function(i) { var isSortable = i % 2; $(this).attr('title', isSortable ? "Not Sortable" : "Click header to sort."); }); I'd like to replace the demo expression 'i % 2' with a check of the colMode's sortable property, but I can't figure out how to get the value of the colModel's sortable property. colModel: [ { name: 'Name', index: 'Name', width: 100, sortable: true }, { name: 'Note', index: 'Note', width: 200, sortable: false } ] I've tried .getGridParam and .getColProp but I don't think the syntax I'm using is correct.

    Read the article

  • jqgrid and django models

    - by Andrew Gee
    Hi, I have the following models class Employee(Person): job = model.Charfield(max_length=200) class Address(models.Model): street = models.CharField(max_length=200) city = models.CharField(max_length=200) class EmpAddress(Address): date_occupied = models.DateField() date_vacated = models.DateField() employee = models.ForeignKey() When I build a json data structure for an EmpAddress object using the django serialzer it does not include the inherited fields only the EmpAddress fields. I know the fields are available in the object in my view as I can print them but they are not built into the json structure. Does anyone know how to overcome this? Thanks Andrew

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >