Forum
15:07
05/03/2012
Hi everybody,
since no one could help in the "Help" Forum (http://www.trirand.com/blog/?p.....ys/#p26060) with the following issue, I assume this is a bug:
When using the "Enter / Esc" Key functionality, the active/inactive states of the inline nav buttons is not updated correctly. As a plus, when using the grids "ondblClickRow" event for entering inline – editing, the buttons states are not updated too. To clearify this, here some screens made from a slightly modified grid example from the jqgrid examples page:
datatype: "local",
height: 250,
pager:"pgGrid",
ondblClickRow:function(rowid) {
$('#tblGrid').jqGrid('editRow',rowid,true);
},
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[ {name:'id',index:'id', width:60, sorttype:"int",editable:true},
{name:'invdate',index:'invdate', width:90, sorttype:"date",editable:true},
{name:'name',index:'name', width:100,editable:true},
{name:'amount',index:'amount', width:80, align:"right",sorttype:"float",editable:true},
{name:'tax',index:'tax', width:80, align:"right",sorttype:"float",editable:true},
{name:'total',index:'total', width:80,align:"right",sorttype:"float",editable:true},
{name:'note',index:'note', width:150, sortable:false,editable:true}
],
caption: "Manipulating Array Data"
});
$("#tblGrid").jqGrid('navGrid',"#pgGrid",{edit:false,add:false,del:true});
$("#tblGrid").jqGrid('inlineNav',"#pgGrid",{addParams:{position:'last',addRowParams:{keys:true}},editParams:{keys:true}});
1) The source Grid:
[Image Can Not Be Found]
2) The grid after doubleClicking the first line; this is in edit mode, but the inline buttons aren't (save + abort deactivated)
[Image Can Not Be Found]
3) The grid after clicking the "edit" button with first line selected; the row and the buttons are both in edit – mode (save + abort activated, edit + add deactivated)
[Image Can Not Be Found]
4) The grid after pressing "Esc" or "Enter"; the row left edit mode, the inline buttons didn't: edit + add are deativated, save + abort activated)
[Image Can Not Be Found]
Am I doing something wrong or can anybody confirm this as a bug?
Thx in advance!
Snoopy
18:10
Moderators
30/10/2007
Hello,
Yes there was a bug regarding keys : true option.
We have made a lot of fixes regarding this. All of them are in GitHub.
You can test these and let me know if they are fixed for you.
Thanks.
Kind Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:35
05/03/2012
Hi Tony,
I cloned the current git repository, used gradlew to build the .js files and copied them to the sites location. I used exactly the same example grid as I did in my post before, here are the results:
1.) The dblClick issue is NOT resolved, same behaviour as in point 2 of my starting post.
2.) Entering edit mode with click on "edit"-button works as expected, pressing the ESC - Key afterwards also works.
3.) Pressing the enter key while in edit mode by clicking the edit-button makes the page reload itself and "alert" the repsonse text...?!
Regards
Snoopy
21:53
05/05/2011
Oleg has posted in fixes in stackoverflow.com is number of answers, eq.
in stackoverflow.com/questions/8548328/jqgrid-how-to-pass-data-when-adding-row-using-add-navigator-button
(my change is marked as AM):
var isNonEditable, isEditing, $row, selectedId = grid.jqGrid('getGridParam', 'selrow'),
rid = $.jgrid.jqID(selectedId), rowSelector = 'tr#' + rid;
if (selectedId === null) {
// no rows in grid - no View, no Edit, no Delete, but Add
$("#add_list, #add_list_top, #grid_iladd").removeClass('ui-state-disabled');
$("#view_grid_top, #del_grid, #del_grid_top, #edit_grid, #edit_grid_top, #grid_iledit, #grid_ilsave, grid_ilcancel").addClass('ui-state-disabled');
} else {
$row = $(rowSelector);
isEditing = $row.attr('editable') || '0';
isNonEditable = $row.hasClass('not-editable-row');
// no row selected or selected row has - no View, no Delete
$("#view_list_top").removeClass('ui-state-disabled');
if (isNonEditable) {
$("#del_grid, #del_grid_top, #edit_grid, #edit_grid_top, #grid_iledit").addClass('ui-state-disabled');
} else if (isEditing === '1') {
$("#grid_ilsave, grid_ilcancel").removeClass('ui-state-disabled');
$("#add_grid, #add_grid_top, #grid_iladd, #del_grid, #del_grid_top, #edit_grid, #edit_grid_top, #grid_iledit").addClass('ui-state-disabled');
} else {
$("#grid_ilsave, #grid_ilcancel").addClass('ui-state-disabled');
$("#add_grid, #add_grid_top, #grid_iladd, #del_grid, #del_grid_top, #edit_grid, #edit_grid_top, #grid_iledit").removeClass('ui-state-disabled');
// AM. comments and " removed
$(rowSelector + " div.ui-inline-edit, " + rowSelector + " div.ui-inline-del",
rowSelector + ".ui-jqgrid-btable:first").hide();
$(rowSelector + " div.ui-inline-save, " + rowSelector + " div.ui-inline-cancel",
rowSelector + ".ui-jqgrid-btable:first").show();
}
}
};
Most Users Ever Online: 715
Currently Online:
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66