tonytomov / jqGrid
- Source
- Commits
- Network (55)
- Issues (13)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
-
If i search on a specific field that 'has value' X (where X can be any search criteria) nothing happens.
In my example i used the word '@muziekgebouw' or 'muziekgebouw' which did not do anything but showing the 'loading' status for 1 sec.
Smaller terms will give me the correct results.
Comments
-
Hi,
I am having an issue with "getRowData" which was retrieving a strange html response for one column, example: "jqGrid.getRowData( id ).value" was returning like "
Hope it helps, and once again thanks for this excellent work on jqgrid!
Comments
Hi,
Just realized my suggestion of correction was not totally right. when sorting cols "cellVal" variable is an object, and with my modification sorting cols breaks down. (I am using datatype: "local")
So I changed to the following:
if (ret) return ret;
var cellValIsObject = (cellval !== null) && (typeof( cellval ) == 'object');
if (cellValIsObject)
return cnt===true ? $(cellval).text() : $.jgrid.htmlDecode($(cellval).html()); else
return cnt===true ? cellval : $.jgrid.htmlDecode( cellval ); -
Cell update fails on modal edit dialog and edittype "select"
0 comments Created 3 months ago by ToKaFreebitsHi Tony,
I'm currently using a combination of inline editing and the new row editing modal dialog. The inline edits work well and all gets updates correctly. (server and client side) On using the modal edit dialog all text/date cells work very well but on changing the value of a dropdown cell (edittype "select") it won't get updated correctly after a click on "save". Instead it automatically jumps to the first dropdown index-value-pair. I've done some tests by using "beforeSubmit" and "afterSubmit"... the argument "postdata" inside "beforeSubmit" contains the correct dropdown value (the index value) but the "afterSubmit" callback shows that the "postdata" dropdown value is set to the select option "value" not "index". So I assume the grid accepts a value to be formatted into a string (as used to by using the select formatter) but gets a string from the edit dialog.
Can you reproduce this behaviour? I think this is a bug.
Greetings
- Marcel KarrasComments
-
Hello Tony,
I just tried to let the user edit a row value that is not visible in my table but should be editable using the modal edit dialog (notices, descriptions, comments etc.). So I tried various column model options but couldn't get it using the following options:
{...,
'hidden': true, 'hidedlg': false, 'editrules': { searchhidden: false, edithidden: false }}
It seems if the 'hidedlg' option is completely unrecognized and only 'hidden' has any effect. The 'edithidden' field seems to have no effect also. (I tested it without editrules at all but no change)
Is this a bug or a misunderstanding on my side?Greetings
- Marcel KarrasComments
-
Hi Tony,
I've found a bug using IE8: If you try to start a form edit without having selected an entry there'll be a javascript error and only the grey overlay is shown but no dialog.
Greetings
- Marcel KarrasComments
-
Firebug reports the following error when the grid is empty and you try to manually set the width via the setGridWidth function:
$t.grid.cols[lvc] is undefined
I did some looking around and I think it is because of line 1774 in file grid.base.js:
if(cl>0) $t.grid.cols[lvc].style.width = cw+"px";Comments
-
I can't increase the width of the last column
Comments
-
When there are many fields, it is impossibile to edit and save due to limited edit form height..
Please, insert this code in grid.formedit.js on line 416, after the viewModal call to resize and let scrollbars show:
var $parentdiv=$($t).parents('.ui-jqgrid:first');
frm.css('height',Math.min(frm.height(),$parentdiv.height()-80)+'px');Thanks
Comments
-
Hi Tony, is there a way to specify an initial list of fields, operators and values to jqGrid?
I know that the filter form set the search, postData and page properties, and than calls trigger('reloadGrid'); can you enable a filter parameter to pass to the grid constructor?
Thanks
Comments
-
Allow modification of editoptions in beforeEditCell event handler
0 comments Created 2 months ago by brianpeirisA small change in
grid.celledit.jscould allow modification of editoptions in the beforeEditCell event handler. This would allow users to specific dynamic values for input elements such as<select/>lists.*** grid.celledit.js 2009-10-24 22:15:50.042000000 -0400 --- grid.celledit.js.new 2009-10-24 22:15:40.262000000 -0400 *************** *** 76,84 **** if(tmp2) {tmp = tmp2;} } - var opt = $.extend({}, $t.p.colModel[iCol].editoptions || {} ,{id:iRow+"_"+nm,name:nm}); - var elc = createEl($t.p.colModel[iCol].edittype,opt,tmp,true); if ($.isFunction($t.p.beforeEditCell)) { $t.p.beforeEditCell($t.rows[iRow].id,nm,tmp,iRow,iCol); } $(cc).html("").append(elc).attr("tabindex","0"); window.setTimeout(function () { $(elc).focus();},0); --- 76,84 ---- if(tmp2) {tmp = tmp2;} } if ($.isFunction($t.p.beforeEditCell)) { $t.p.beforeEditCell($t.rows[iRow].id,nm,tmp,iRow,iCol); } + var opt = $.extend({}, $t.p.colModel[iCol].editoptions || {} ,{id:iRow+"_"+nm,name:nm}); + var elc = createEl($t.p.colModel[iCol].edittype,opt,tmp,true); $(cc).html("").append(elc).attr("tabindex","0"); window.setTimeout(function () { $(elc).focus();},0);Comments
-
The following column model:
colModel: [ {name:'friendly_time',index:'created_time',align:'center',width:120,fixed:true,resizable:false,classes:'small gray'}, {name:'marked_up_message',index:'message',width:300,classes:'ui-ellipsis'}, {name:'comments_count',index:'comments_count',width:95,align:"center",resizable:false,fixed:true}, {name:'likes_count',index:'likes_count',width:85,align:"center",resizable:false,fixed:true}, {name:'flags_count',index:'flags_count',width:85,align:"center",resizable:false,fixed:true} ],ends up looking like this in Firefox:
http://img.skitch.com/20091202-kx33im1s626p98pb3fcjgb68dp.png
The rownumWidth is set. Notice how a column is missing? If I remove the
ui-ellipsisclass the problem goes away.Comments
Hello,
Thank you for posting this. In order to resolve the problem, could you please post the entry jqGrid configuration
Thank you very much
Tony$.extend(jQuery.jgrid.defaults, { sortable: true, loadui: 'block', rowNum: 100, gridview: true, viewrecords: true, rownumbers: true, rownumWidth: 40, autowidth: true, hidegrid: false, scroll: 0, datatype: "json", jsonReader : { root : 'rows', repeatitems: false, id: "id" } }); $("#posts-grid").jqGrid({ url:"<%= grid_url %>", emptyrecords: "No posts found.", pager: $('#posts-grid-nav'), sortname: $.cookie('mod-posts-sortname'), sortorder: $.cookie('mod-posts-sortorder'), caption: "Facebook Posts", colNames: ['When','Message','Comments','Likes','Flags'], colModel: [ {name:'friendly_time',index:'created_time',align:'center',width:120,fixed:true,resizable:false,classes:'small gray'}, {name:'marked_up_message',index:'message',width:300,classes:'ui-ellipsis'}, {name:'comments_count',index:'comments_count',width:95,align:"center",resizable:false,fixed:true}, {name:'likes_count',index:'likes_count',width:85,align:"center",resizable:false,fixed:true}, {name:'flags_count',index:'flags_count',width:85,align:"center",resizable:false,fixed:true} ] }); $("#posts-grid").jqGrid('navGrid','#posts-grid-nav',{search:false,edit:false,add:false,del:false}); -
Rendering the grid in IE7 is between 5 - 8 times slower than IE8 / firefox. From looking at the code there seems to be a lot of string concatenation, and also some inefficient jQuery selectors. I'm setting the "gridview" option to true.
Comments
-
Good Day Tony, I'm looking to validate the contents of a form's data before it is submit via the following code:
jQuery("#case_suspensions").navGrid('#pager10', {edit:true,add:true,del:true,search:false},
{beforeSubmit: function(postdata,formid){ return[false,"test here",""];} });This "pager" is attached to the following grid, but I'm not getting the beforeSubmit event to trigger, any ideas? I am using version 3.6.
Thxs in advance for any help.jQuery("#case_suspensions").jqGrid({
url:'sched_discipline_suspensions.php?case_no='+document.getElementById("hold_case").innerHTML, datatype: 'xml', mtype: 'POST', sortable: true, colNames:['Game #','From Date','To Date','Life Time'], colModel:[ {name:'game_no',index:'game_no',width:130,sortable:true,align:"left",editable: true,editrules:{custom:true,custom_func:IsNumeric}}, {name:'datefrom',index:'datefrom',width:150,editable: true,editoptions:{size:12, dataInit:function(element){ $(element).datepicker({dateFormat:'yy-mm-dd'});}}}, {name:'dateto',index:'dateto',width:150, editable: true,editoptions:{size:12, dataInit:function(element){ $(element).datepicker({dateFormat:'yy-mm-dd'});}}}, {name:'lifetime',index:'lifetime',width:100,sortable:true,editable:true,edittype:"select",editoptions:{value:<?php echo $list1;?>},align:"center"}, ], pager: jQuery('#pager10'), rowNum:10, multiselect:false, height: "100%", viewrecords: true, caption:'Suspensions Assigned', cellEdit: true, editurl:'sched_case_suspension_add.php?case_no='+document.getElementById("hold_case").innerHTML, cellsubmit: 'clientArray', beforeSubmitCell : function(id,name,val,iRow){ if($("#case_suspensions").getCell(id,1) > $("#case_suspensions").getCell(id,2) && $("#case_suspensions").getCell(id,2) != '0000-00-00'){ alert("TO DATE Must be After FROM DATE"); $("#case_suspensions").trigger("reloadGrid"); return false;} else {if(($("#case_suspensions").getCell(id,1) != '0000-00-00' || $("#case_suspensions").getCell(id,2)!= '0000-00-00') && ($("#case_suspensions").getCell(id,0)) != ""){alert("Cannot combine Game and Time Suspension"); $("#case_suspensions").trigger("reloadGrid"); return false;} else {x_discipline_change(name,val,id,gridReload);}} }});
Comments





Hello,
I think the problem is server side. Please check what you do on server