Search Results

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

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

  • JQGrid and JQuery Autocomplete

    - by Neff
    When implementing JQGrid 4.3.0, Jquery 1.6.2, and JQuery UI 1.8.16 Ive come across an issue with the Inline edit. When the inline edit is activated, some of the elements get assigned an auto complete. When the inline edit is canceld or saved, the auto complete does not always go away (selecting text by double clicking it then hitting delete, then hitting escape to exit row edit). Leaving the auto complete controls in edit mode when the row is no longer considered in edit mode. Perhaps you can tell me if there is a problem with the initialization or if I you are aware of an event post-"afterrestorefunc" that the fields can be returned to their "original" state. Original state being displayed as data in the JQGrid row. I've tried removing the DOM after row close, .remove() and .empty(): ... "afterrestorefunc": function(){ $('.ui-autocomplete-input').remove(); } ... but that causes other issues, such as the jqgrid is not able to find the cell when serializing the row for data or edit, and requires a refresh of the page, not just jqgrid, to be able to once again see the data from that row. Auto complete functionality for the element is created on the double click of the row: function CreateCustomSearchElement(value, options, selectiontype) { ... var el; el = document.createElement("input"); ... $(el).autocomplete({ source: function (request, response) { $.ajax({ url: '<%=ResolveUrl("~/Services/AutoCompleteService.asmx/GetAutoCompleteResponse") %>', data: "{ 'prefixText': '" + request.term + "', 'contextKey': '" + options.name + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", success: function (data) { response($.map(data.d, function (item) { return { label: Trim(item), value: Trim(item), searchVal: Trim(item) } })) } }); }, select: function (e, item) { //Select is on the event of selection where the value and label have already been determined. }, minLength: 1, change: function (event, ui) { //if the active element was not the search button //... } }).keyup(function (e) { if (e.keyCode == 8 || e.keyCode == 46) { //If the user hits backspace or delete, check the value of the textbox before setting the searchValue //... } }).keydown(function (e) { //if keycode is enter key and there is a value, you need to validate the data through select or change(onblur) if (e.keyCode == '13' && ($(el).val())) { return false; } if (e.keyCode == '220') { return false } }); } Other Sources: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing http://api.jqueryui.com/autocomplete/ Update: I tried only creating the autocomplete when the element was focused, and removing it when onblur. That did not resolve the issue either. It seems to just need the autocomplete dropdown to be triggered.

    Read the article

  • Make a jqGrid moveable

    - by Dave
    As it appears that jqGrid is based on the jQuery dialog, is it possible to make it movable (like a dialog)? I've been able to put it inside of a dialog but it looks odd with two title bars and such. I'd "think" that the necessary class could be added to it to make it movable but I'm still fairly new at both jQuery and jqGrid.

    Read the article

  • jqgrid button editing

    - by Sasha
    Hi all, another question about jqgrid. I have a jqgrid table and i have a button in each row. When user clicks on that button, i need to call an action in my mvc controller and i need to change value of my object's field from true to false or opposite and then reload grid. What is the best way to implement this? Thanks.

    Read the article

  • jqGrid error when setting width using new API

    - by Arturo Molina
    I'm using the new API to set the width of my jqGrid like this: $('#grid').jqGrid('setGridWidth', $(window).width() * 0.98); The problem is that in IE7 I'm getting this error: 'p.cellLayout' is null or not an object This only happens in IE7 (IE8, Firefox and Chrome work fine). Has anybody else encounter this problem and fixed it?

    Read the article

  • jqgrid:cancel deleting row(s)

    - by ohana
    hi, I use jqgrid for my data, and enable user to delete rows from the grid. but when user click 'delete' button, jqgrid will popup a 'Delete' dialog to ask user if they wanna delete or cancel, how can i check if user choose 'cancel" before i really submit data deletion to the server? Thanks.

    Read the article

  • jqGrid visibility issues

    - by CoffeeCode
    jqGrid and IE8 are not making friends... ( the jqgrid is invisible in the IE, sometime when the mouse is over it, it appears, but still after sec it disappears. in FF, Chrome, Opera it works fine. is there a good explanation for this??

    Read the article

  • Resize jqGrid based on number of rows?

    - by Rosdi
    I want my jqGrid to shrink and expand based on the number of rows it has. Let say it currently has 10 rows, the height of the jqGrid will shrink to 10 rows (so that no gaping empty rows is exposed). If however there are too many rows, the height of the grid will expand to a maximum 'height' value and a scroll bar will appear.

    Read the article

  • Query select field on JqGrid edit form

    - by abuzuhair
    I have this colom Model on JqGrid: {name:'ta',index:'ta',jsonmap:'ta',width:70,editable:true,edittype:'select', editoptions: {dataUrl:hostname+'/sisfa/ta_cb'}} I am using JqGrid form editing to edit this field. How to 'catch' the field editor for this field on form editing. I'm using this method, but not work .editGridRow("new", {closeAfterAdd: true, addCaption:'Add Data', width:500,dataheight:300,beforeShowForm:function(formid){ console.log($('#tr_ta').find('select[name=ta]')); }}); This method work for other edittype.

    Read the article

  • Remember (persist) the filter, sort order and current page of jqGrid

    - by Jimbo
    My application users asked if it were possible for pages that contain a jqGrid to remember the filter, sort order and current page of the grid (because when they click a grid item to carry out a task and then go back to it they'd like it to be "as they left it") Cookies seem to be the way forward, but how to get the page to load these and set them in the grid before it makes its first data request is a little beyond me at this stage. Does anyone have any experience with this kind of thing with jqGrid? Thanks!

    Read the article

  • jQgrid: multiple column row headers

    - by Jonathan
    I am trying to extend my jQGrid to have multiple rows for the header. It will look something like this ----------------------- Level 1 - > | Application | ----------------------- Level 2 - > |Code | Name | ----------------------- | 0002827| Mobile Phone1 | 0202827| Mobile Phone2 | 0042827| Mobile Phon3e | 0005827| Mobile Phone4 | 0002627| Mobile Phon5e | 0002877| Mobile Phone6 | 0002828| Mobile Phone7 I am wondering how to do this with jQGrid 3.8.2? Any ideas?

    Read the article

  • How to resolve situation with jqGrid - not save value when move to next page

    - by user1288108
    I set new value at the last row and right col on the first page of the jqGrid. After this I move to the next page and see the same new value on the first row and right col!!! I am return to the first page and see in the last row and right col the previos value(not new one). The jqGrid is initialized with datatype: "xmlstring" from javascript variable who is set with "datastr" parameter. How to resolve the situation?

    Read the article

  • asp.net mvc jquery + tabs +jqgrid +jqgrid loaded only for first tab

    - by niao
    Greetings, I have a problem using jqgrid and jquery tab (I am coding in asp.net mvc) I have two tabs. Each tabs should contains jqgrid with different data. I specify tabs as follows: <script type="text/javascript"> $(document).ready(function() { $("#tabs").tabs(); getContentTab (1); }); function getContentTab(index) { var url='<%= Url.Content("~/Admin/GetWorkspaces") %>/' + index; var targetDiv = "#tabs-" + index; var ajaxLoading = "<img id='ajax-loader' src='<%= Url.Content("~/Content") %>/ajax-loader.gif' align='left' height='28' width='28'>"; $(targetDiv).html("<p>" + ajaxLoading + " Loading...</p>"); $.get(url,null, function(result) { $(targetDiv).html(result); }); } </script> <div id="tabs"> <ul> <li><a href="#tabs-1" onclick="getContentTab(1);">tab1</a></li> <li><a href="#tabs-2" onclick="getContentTab(2);">tab2</a></li> </ul> <div id="tabs-1"> </div> <div id="tabs-2"> </div> </div> As seen above GetWorkspaces action gets my tabs: public ActionResult GetWorkspaces(int id) { string viewName = string.Empty; switch (id) { case 1: viewName = "MarketplaceOfferView"; break; case 2: viewName = "MyMessagesView"; break; } return PartialView(viewName); } each of view is a partial view. In these partial views I have jqgrids specified as follows: <script type="text/javascript"> jQuery("#list").ready(function() { jQuery("#list").jqGrid({ url: '/Admin/GetGridData/', datatype: 'json', mtype: 'GET', colNames: ['Klient', 'Zapytanie', 'Atrakcyjnosc', 'Cena', 'Data poczatkowa', 'Data koncowa', 'Branza', 'Lokalizacja' ], colModel: [ { name: 'CompanyName', index: 'CompanyName', width: 150, align: 'left' }, { name: 'Content', index: 'ContactName', width: 300, align: 'left' }, { name: 'Rating', index: 'Address', width: 150, align: 'left' }, { name: 'Price', index: 'City', width: 150, align: 'left' }, { name: 'Price', index: 'City', width: 150, align: 'left' }, { name: 'Price', index: 'City', width: 150, align: 'left' }, { name: 'Price', index: 'City', width: 150, align: 'left' }, { name: 'Price', index: 'PostalCode', width: 100, align: 'left' } ], pager: jQuery('#pager'), rowNum: 100, rowList: [5, 10, 20, 50], sortname: 'Operator.FullName', sortorder: "asc", viewrecords: true, imgpath: '/scripts/themes/steel/images', caption: 'Historia moich wiadomosci', height:400 }); // .navGrid(pager, { edit: true, add: false, del: false, refresh: true, search: false }); }); </script> Historia moich wiadomosci <table id="list" class="scroll" cellpadding="0" cellspacing="0" width="100%"> </table> <div id="pager" class="scroll" style="text-align: center;"> </div> For second view I have an action: /Admin/GetGridDataForTab2/ THe problem is that I see a jqgrid only when I click on first tab. When I click on second tab the grid is not displayed and /Admin/GetGridData/ is not executed. Does anybody have an idea what is wrong?

    Read the article

  • jqGrid concatinating/building html tag incorrectly

    - by Energetic Pixels
    Please excuse to length of post. But I needed to explain what I am seeing. I have a onSelectRow option that is supposed to build stacked html <li> tags (such as <li>...</li> <li>...</li> <li>...</li> ) up to the number of static xml elements that I am looking at. But my script is concatinating all the image src links together instead of building the whole listobject tag. Everything else in my jqGrid script works with exception of repeated elements inside my xml. onSelectRow: function() { var gsr = $('#searchResults').jqGrid('getGridParam', 'selrow'); if (gsr) { var data = $('#searchResults').jqGrid('getRowData', gsr); $('#thumbs ul').html('<li><a class='thumb' href='' + data.piclocation + '' title='' + data.pictitle + ''><img src='" + data.picthumb + "' alt='" + data.pictitle + "' /></a><div class='caption'><div class='image-title'>" + data.pictitle + "</div></div></li>"); };" my xml file is something like this: <photo> <pic> <asset>weaponLib/stillMedia/slides/A106.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_A.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_A.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_B.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_B.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_C.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_C.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> <pic> <asset>weaponLib/stillMedia/slides/A106_D.jpg</asset> <thumb>weaponLib/stillMedia/thumbs/A106_D.jpg</thumb> <caption>Side view of DODIC A106</caption> <title>Side view of 22 caliber long rifle ball cartridge</title> </pic> My script works fine when it only sees one sequence, but when it sees more than one it puts all html inside the tags together then for the caption and title does the same for them. It generates only one <li></li> tag set instead of 5 in the example above like I want. The <li> tags are being used by a slideshow (with thumbnails) utility. Inside firebug, I can see the object that it is built for me: <a title="Side view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridge" href="weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg" class="thumb"><img alt="Side view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridgeSide view of 22 caliber long rifle ball cartridge" src="weaponLib/stillMedia/thumbs/A106.jpgweaponLib/stillMedia/thumbs/A106_A.jpgweaponLib/stillMedia/thumbs/A106_B.jpgweaponLib/stillMedia/thumbs/A106_C.jpgweaponLib/stillMedia/thumbs/A106_D.jpg"></a> Within jqGrid, the cell is holding: <td title="weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg" style="text-align: center; display: none;" role="gridcell">weaponLib/stillMedia/slides/A106.jpgweaponLib/stillMedia/slides/A106_A.jpgweaponLib/stillMedia/slides/A106_B.jpgweaponLib/stillMedia/slides/A106_C.jpgweaponLib/stillMedia/slides/A106_D.jpg</td> I know that jqGrid is building it wrong. I am double-stumped as to direction to fix it. Any suggestions would be greatly greatly appreciated. tony

    Read the article

  • JqGrid Add custom button to Row

    - by oirfc
    Hi there, I am trying to add a custom button to a JqGrid that implements a 'Check Out' process. Basically, every row has a 'Check Out' button that if clicked should be able to send a post back to the server and update a shopping cart and then change the button text to 'Undo Check Out'. So far I have: colNames: ['Id', ... , 'Action' ], colModel: [ { name: 'Id', sortable: false, width: 1, hidden: true}, ... { name: 'action', index: 'action', width: 75, sortable: false } ], ... gridComplete: function() { var ids = jQuery("#east-grid").jqGrid('getDataIDs'); for (var i = 0; i < ids.length; i++) { var cl = ids[i]; checkout = "<input style='height:22px;width:75px;' type='button' value='Check Out' onclick=\" ??? \" />"; jQuery("#east-grid").jqGrid('setRowData', ids[i], { action: checkout }); } }, ... Where '???' is the part I need to solve. Thank you in advance for your help.

    Read the article

  • jQuery jqGrid TreeGrid not functionining properly

    - by Raul Agrait
    Hello. I am having trouble constructing a jqGrid TreeGrid using local data. This method works just fine as a regular grid if you comment out the treeGrid and ExpandColumn attributes, but once you add those to try to make it a tree grid, it doesn't create the tree grid, and it no longer sorts properly. jQuery(function(){ var gridOptions = { datatype: "local", height: 250, colNames: ['Name', 'Type', 'Last Modified On', 'Last Modified By'], colModel: [{name: 'name', index: 'name', width: 200, sorttype: 'text'}, {name: 'type', index: 'type', width: 200, sorttype: 'text'}, {name: 'modifiedon', index: 'modifiedon', width: 200, sorttype: 'date'}, {name: 'modifiedby', index: 'modifiedby', width: 200, sorttype: 'text'}], treeGrid: true, ExpandColumn: 'name', caption: "My Grid" }; jQuery("#treeGrid").jqGrid(gridOptions); var gridData = [ {name: "My File", type: "My File Type", modifiedon: "03/10/2010", modifiedby"Strong Sad", lft: "1", rgt: "8", level: "0"}, {name: "One of Everything", type: "Word Document", modifiedon: "02/12/2009", modifiedby: "Strong Bad", lft: "2", rgt: "5", level: "0"}, {name: "My Presentation", type: "PowerPoint", modifiedon: "01/23/2009", modifiedby: "The Cheat", lft: "3", rgt: "4", level: "0"} ]; for (var i = 0; i < gridData.length; i++) { jQuery("#treeGrid").jqGrid('addRowData', i + 1, gridData[i]); } });

    Read the article

  • JQGrid datatype as Ajax function not getting called

    - by mraman
    Hi, JQGrid datatype as Ajax function not getting called. once i tried to debug using firebug, found out that those lines are not exectuced. please let me know the issue with my code. Thanks in advance. jQuery("#list").jqGrid({ //url:'example.xml', datatype: function() { $.ajax({ url: "example.xml", data: "{}", dataType: "xml", mtype: "GET", complete: function(jsondata, stat) { alert((jsondata.responseText)); if (stat == "success") { alert("ew"); } }, error : function () {alert("error")} }); }, colNames:['QueueName','SLA Associated', 'SLA met', 'SLA Breached', 'SLA MET %', 'SLA Breached %'], colModel :[ {name:'QueueName',index:'QueueName', width:150}, {name:'SLAAssociated',index:'SLAAssociated', width:150}, {name:'SLAmet',index:'SLAmet', width:150}, {name:'SLABreached',index:'SLABreached', width:150}, {name:'SLAMETPer',index:'SLAMETPer', width:150}, {name:'SLABreachedPer',index:'SLABreachedPer', width:150} ], pager: jQuery('#pager1'), rowNum:1, rowList:[5,10], imgpath: 'themes/basic/images' }); in Header i add as follows <html xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" type="text/css" media="screen" href="themes/basic/grid.css" /> <link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" /> <link rel="stylesheet" type="text/css" media="screen" href="css/report.css" /> <script src="jquery.js" type="text/javascript"></script> <script src="jquery.jqGrid.js" type="text/javascript"></script> <script src="js/jqModal.js" type="text/javascript"></script> <script src="js/jqDnR.js" type="text/javascript"></script>

    Read the article

  • Correctly calling setGridWidth on a jqGrid inside a jQueryUI Dialog

    - by Dan
    I have a jQueryUI dialog (#locDialog) which has a jqGrid ($grid) inside it. When the Dialog opens (initially, but it gets called whenever it opens), I want the $grid to resize to the size of the $locDialog. When I do this initially, I get scrollbars inside the grid (not inside the dialog). If I debug the code, I see the width of the $grid is 677. So, I call setGridWidth() again and check the width and now I have 659, which is 18px less, which is the size of the scroll area for the jqGrid (Dun-dun-dun..) When I rezie the dialog, I resize the grid as well, and everything is happy - no scrollbars, except where necessary. My dialog init code: $locDialog = $('#location-dialog').dialog({ autoOpen: false, modal: true, position: ['center', 100], width: 700, height:500, resizable: true, buttons: { "Show Selected": function() {alert($('#grid').jqGrid('getGridParam','selarrrow'));}, "OK": function() {$(this).dialog('close');}, "Cancel": function() {$(this).dialog('close');} }, open: function(event, ui) { $grid.setGridHeight($(this).height()-54); // No idea why 54 is the magic number here $grid.setGridWidth($(this).width(), true); }, close: function(event, ui) { }, resizeStop: function(event, ui) { $grid.setGridWidth($locDialog.width(), true); $grid.setGridHeight($locDialog.height()-54); } }); I am curious if anyone has seen this before. Really, it isn't the end of the world if I initially have unnecessary scrollbars at first, but it is just odd that when I call setGridWidth initially, it doesn't take into account the scroll area of 18px. As far as the magical number 54, that is the number I had to subtract from the height of the dialog value to get the grid to render without unnecessary scrollbars.

    Read the article

  • How to do server-side validation using Jqgrid?

    - by Eoghan
    Hi, I'm using jqgrid to display a list of sites and I want to do some server side validation when a site is added or edited. (Form editing rather than inline. Validation needs to be server side for various reasons I won't go into.) I thought the best way would be to check the data via an ajax request when the beforeSubmit event is triggered. However this only seems to work when I'm editing an existing row in the grid - the function isn't called when I add a new row. Have I got my beforeSubmit in the wrong place? Thanks for your help. $("#sites-grid").jqGrid({ url:'/json/sites', datatype: "json", mtype: 'GET', colNames:['Code', 'Name', 'Area', 'Cluster', 'Date Live', 'Status', 'Lat', 'Lng'], colModel :[ {name:'code', index:'code', width:80, align:'left', editable:true}, {name:'name', index:'name', width:250, align:'left', editrules:{required:true}, editable:true}, {name:'area', index:'area', width:60, align:'left', editable:true}, {name:'cluster_id', index:'cluster_id', width:80, align:'right', editrules:{required:true, integer:true}, editable:true, edittype:"select", editoptions:{value:"<?php echo $cluster_options; ?>"}}, {name:'estimated_live_date', index:'estimated_live_date', width:120, align:'left', editable:true, editrules:{required:true}, edittype:"select", editoptions:{value:"<?php echo $this->month_options; ?>"}}, {name:'status', index:'status', width:80, align:'left', editable:true, edittype:"select", editoptions:{value:"Live:Live;Plan:Plan;"}}, {name:'lat', index:'lat', width:140, align:'right', editrules:{required:true}, editable:true}, {name:'lng', index:'lng', width:140, align:'right', editrules:{required:true}, editable:true}, ], height: '300', pager: '#pager-sites', rowNum:30, rowList:[10,30,90], sortname: 'cluster_id', sortorder: 'desc', viewrecords: true, multiselect: false, caption: 'Sites', editurl: '/json/sites' }); $("#sites-grid").jqGrid('navGrid','#pager-sites',{edit:true,add:true,del:true, beforeSubmit : function(postdata, formid) { $.ajax({ url : 'json/validate-site/', data : postdata, dataType : 'json', type : 'post', success : function(data) { alert(data.message); return[data.result, data.message]; } }); }});

    Read the article

  • jqGrid with JSON data renders table as empty

    - by jgreep
    I'm trying to create a jqgrid, but the table is empty. The table renders, but the data doesn't show. The data I'm getting back from the php call is: { "page":"1", "total":1, "records":"10", "rows":[ {"id":"2:1","cell":["1","image","Chief Scout","Highest Award test","0"]}, {"id":"2:2","cell":["2","image","Link Badge","When you are invested as a Scout, you may be eligible to receive a Link Badge. (See page 45)","0"]}, {"id":"2:3","cell":["3","image","Pioneer Scout","Upon completion of requirements, the youth is invested as a Pioneer Scout","0"]}, {"id":"2:4","cell":["4","image","Voyageur Scout Award","Voyageur Scout Award is the right after Pioneer Scout.","0"]}, {"id":"2:5","cell":["5","image","Voyageur Citizenship","Learning about and caring for your community.","0"]}, {"id":"2:6","cell":["6","image","Fish and Wildlife","Demonstrate your knowledge and involvement in fish and wildlife management.","0"]}, {"id":"2:7","cell":["7","image","Photography","To recognize photography knowledge and skills","0"]}, {"id":"2:8","cell":["8","image","Recycling","Demonstrate your knowledge and involvement in Recycling","0"]}, {"id":"2:10","cell":["10","image","Voyageur Leadership ","Show leadership ability","0"]}, {"id":"2:11","cell":["11","image","World Conservation","World Conservation Badge","0"]} ]} The javascript configuration looks like so: $("#"+tableId).jqGrid ({ url:'getAwards.php?id='+classId, dataType : 'json', mtype:'POST', colNames:['Id','Badge','Name','Description',''], colModel : [ {name:'awardId', width:30, sortable:true, align:'center'}, {name:'badge', width:40, sortable:false, align:'center'}, {name:'name', width:180, sortable:true, align:'left'}, {name:'description', width:380, sortable:true, align:'left'}, {name:'selected', width:0, sortable:false, align:'center'} ], sortname: "awardId", sortorder: "asc", pager: $('#'+tableId+'_pager'), rowNum:15, rowList:[15,30,50], caption: 'Awards', viewrecords:true, imgpath: 'scripts/jqGrid/themes/green/images', jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: true, cell: "cell", id: "id", userdata: "userdata", subgrid: {root:"rows", repeatitems: true, cell:"cell" } }, width: 700, height: 200 }); The HTML looks like: <table class="awardsList" id="awardsList2" class="scroll" name="awardsList" /> <div id="awardsList2_pager" class="scroll"></div> I'm not sure that I needed to define jsonReader, since I've tried to keep to the default. If the php code will help, I can post it too.

    Read the article

  • long delay between serverside JSON and jqGrid loadComplete on asp.net mvc site

    - by ooo
    i have an asp.net mvc site where i load a jqgrid with json data public ActionResult GridData(GridData args) { IEnumerable<Application> applications = EntityModel.GetAll().ToList(); applications = FilterEntities(applications); if (args.sidx.IsNullOrEmpty() || args.sidx == "Id") { args.sidx = "Name"; args.sord = "asc"; } applications = applications.GridSort(args.sidx, args.sord); var paginatedData = applications.GridPaginate(args.page ?? 1, args.rows ?? 10, i => new { i.Id, Name = "<div class='showDescription' Id= '" + i.MyId + "'>" + i.Name + "</div>", MyId = string.Format("<a i.LastUpdated, i.LastUpdatedColumn }); return Json(paginatedData); } and here is my javascript code: function doInitCrudGrid(controller, names, model, editable, querystring) { jQuery("#grid").jqGrid({ mtype: 'POST', url: "/" + controller + "/GridData?" + querystring, datatype: "json", colNames: names, colModel: model, imgpath: "/Scripts/jqGrid/themes/steel/images", rowNum: 20, rowList: [10, 20, 50, 999], altRows: true, altclass: "altRow", jsonReader: { root: "Rows", page: "Page", total: "Total", records: "Records", repeatitems: false, id: "Id" }, pager: "#pager", height: "auto", sortname: "Id", viewrecords: true, sortorder: "desc", loadComplete: function() { alert("Load Complete"); }, ondblClickRow: function(rowid) { } }); i have a breakpoint on the return Json(paginatedData); line and that gets hit very quick but after that it takes about 10 seconds for the: alert("Load Complete"); and for the rendering to show up on the web page. Is there anyway to debug this or way to see why there would be this large delay between finishing the server side json and histting the loadcomplete on the javascript callback ?

    Read the article

  • Best way to change jqGrid rowNum from ALL to -1 before pass to a web service

    - by Billyhole
    I'm looking to find the best way to allow users to choose to show ALL records in a jqGrid. I know that a -1 value passed for the rows parameter denotes ALL, but I want the word "ALL" not a -1 to appear in the rowList select element, ie. rowList: [15, 50, 100, 'ALL']. I'm passing the grid request to a web service which accepts an int for "rows", and I'm trying find how and when I should change the user selected value of "ALL" to a -1 before it gets sent to the web service. Below is my cleaned up grid code. I tried some various code blocks before my $.ajax in the datatype function. But most attempts just seemed like I have to be doing this the most convoluted way I possibly could. For example, datatype: function(postdata) { if ($("#gridTableAssets").jqGrid('getGridParam', 'rowNum') == 'ALL') { $("#gridTableAssets").appendPostData({ "rows": -1, "page": 1 }); } $.ajax({... But doing that seemed to cause the actual "page" GridParam to be nulled out on subsequent grid actions, forcing me handle that in other places. There just seems like this is something that would be frequently done out there and have clean way of doing it. Cleaned grid code: $("#gridTableAssets").jqGrid({ datatype: function(postdata) { $.ajax({ url: "/Service/Repository.asmx/GetAssets", data: JSON.stringify(postdata), type: 'POST', contentType: "application/json; charset=utf-8", error: function(XMLHttpRequest, textStatus, errorThrown) { alert('error'); }, success: function(msg) { var assetsGrid = $("#gridTableAssets")[0]; assetsGrid.addJSONData(JSON.parse(msg)); ... } }); }, ... pager: $('#pagerAssets'), rowNum: 15, rowList: [15, 50, 100, 'ALL'], ... onPaging: function(index, colindex, sortorder) { SessionKeepAlive(); } }); And here is the web service [WebMethod] public string GetAssetsOfAssetStructure(bool _search, int rows, int page, string sidx, string sord, string filters)

    Read the article

  • JQGRID Master detail on different pages

    - by dennisg
    Hello, I need some help on next things. I was trying to do next few things. I have one grid_test.php (that creates jqgrid) and index_grid.php (just to display grid.php). jQGrid in grid.php have custom button named 'Prikazi'. I want the user to select one row from that grid and when press custom button 'Prikazi' to redirect to another page to show subgrid (and to pass parameter which is the id of the selected row). Subgrid is in the file detail_test.php and also I have file called index_detail.php (for displaying the file detail_test.php with jqgrid). These php files communicate by passing parameter id_reda (or id) that is id of the selected row in grid_test.php. I have tried many ways to achieve that but I wasn't able. Subgrid php file (detail_test.php) receives that parameter but when I add that to sql statement in subgrid file it shows next error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 0' at line 16' in C:\Zend\Apache2\htdocs\jqSuitePHP3811SourceRadna\php\jqGridPdo.php:62 I really don't know what am I doing wrong. Maybe the passing of parameter is wrong and maybe subgrid can't create colModel properly. Or it has something to do with sql statements. Actually my work was based on one of your examples masterdetail, but I wanted to have master grid on one page and when user clicks custom button, goes to another page with detail grid. You can see my example on next page: http://pljevlja.org/grid/index_test.php. And all my php files are here: -http://pljevlja.org/grid/TXT.zip<- Thanks in advance,

    Read the article

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