ASP.NET MVC $.post call returning string…need help with format for jqGrid

If you try to solve the problem for jqGrid only you can choose another way. You can use dataUrl and buildSelect properties of editoptions or searchoptions instead of value property. This features are introduced specially for the usage in AJAX. The dataUrl defines url provided results in the form like <select><option value=”1″>One</option> <option value=”2″>Two</option></select> If … Read more

jqGrid does not render correctly in Chrome/Chrome Frame

I updated today my Chrome to version 19, have reproduced the problem and made the corresponding quick&dirty fix: I suggest to change the line of jqGrid code isSafari = $.browser.webkit || $.browser.safari ? true : false; to the following isSafari = ($.browser.webkit || $.browser.safari) && parseFloat($.browser.version)<536.5 ? true : false; // Chrome < version 19 … Read more

JqGrid need hyperlink – need to capture value through Jquery

In the most cases it’s enough to use something like formatter: “showlink”, formatoptions: { baseLinkUrl: “/Program/”, showAction: “EditMicro”, idName: “myId” } In the case the links will be generated like <a href=”https://stackoverflow.com/Program/EditMicro?myId=123″>text from the cell</a> If you have in the action the id of the row you can get any other additional information which you … Read more

jqGrid: Disable form fields when editing

You can implement your requirements in different ways. For example, inside of beforeShowForm event you can hide or show the jQuery(“#list”).jqGrid({ colModel: [ { name: ‘Name’, width: 200, editable: true }, //… }).jqGrid(‘navGrid’,’#pager’, { edit: true, add: true, del: false}, { // edit option beforeShowForm: function(form) { $(‘#tr_Name’, form).hide(); } }, { // add option … Read more

jqGrid paging question

You are right. It is an old problem. I used always before $(“#list”).setGridParam({page:1}).trigger(‘reloadGrid’); but there is another way. The trigger ‘reloadGrid’ support additional options: ‘current’ and ‘page’. $(“#list”).trigger(“reloadGrid”, [{page:1}]); will reset page to 1 in one step. The usage in the form $(“#list”).trigger(“reloadGrid”, [{current:true}]); allows to preserver current selection. You can of cause combine both … Read more

How to display indirect data in Jqgrid

I answered already on the closed question before (see here). Nevertheless I decide to answer on your question in detail because the problem which you describe is really very common. I start with reminding that jqGrid provides formatter: “select” which uses formatoptions.value or editoptions.value to decode ids to texts. The formatter: “select” uses value and … Read more