Forum
14:05
01/06/2009
When cell-edit is enabled in jqGrid 3.5, editing/tabbing between edit fields causes two identical updates to be sent to the server. If you edit and press enter or click on another cell, only one update is sent. I would expect only one update to be sent when tabbing between cells.
Second problem with editing/tabbing... Edit a cell in the first column and press tab to get to the second cell. Click on any other cell - edit mode on the second cell is not deactivated - then click on the second cell again. The contents the second cell is now filled with the text:
<input name="tax" id="1_tax" style="width: 98%;" type="text">
I have repro'd the issue in the HTML file below. The URL pointed to by cellurl doesn't exist (http://example.com/bogus/url), but this doesn't change the behaviour. I have verified both problems (double post and wacky <input> tag in next edit field) in FireFox 3.5 and Chrome 3 on Windows Vista. (IE8 displays the same problem with the latest jqGrid, but not the one referenced in the repro page below.) I have tried the latest bits from GitHub and the problem is still present:
http://github.com/tonytomov/jq.....b434c6edbe
Thanks in advance for investigating this issue.
James
HTML Repro Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.trirand.com/jqgrid35/themes/redmond/jquery-ui-1.7.1.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.trirand.com/jqgrid35/themes/ui.jqgrid.css" />
<script src="http://www.trirand.com/jqgrid35/js/jquery.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery.layout.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery.tablednd.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery.contextmenu.js" type="text/javascript"></script>
<script src="http://www.trirand.com/jqgrid35/js/jquery.contextmenu.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#celltbl").jqGrid({
datatype: "local",
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
colModel: [{ name: 'id', index: 'id', width: 55 }, { name: 'invdate', index: 'invdate', width: 90, editable: true }, { name: 'name', index: 'name asc, invdate', width: 100 }, { name: 'amount', index: 'amount', width: 80, align: "right", editable: true, editrules: { number: true} }, { name: 'tax', index: 'tax', width: 80, align: "right", editable: true, editrules: { number: true} }, { name: 'total', index: 'total', width: 80, align: "right" }, { name: 'note', index: 'note', width: 150, sortable: false}],
rowNum: 10,
rowList: [10, 20, 30],
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption: "Cell Edit Example",
cellEdit: true,
cellurl: 'http://example.com/bogus/url/'
});
var mydata = [{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" }, { id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" }, { id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" }, { id: "4", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" }, { id: "5", invdate: "2007-10-05", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" }, { id: "6", invdate: "2007-09-06", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" }, { id: "7", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" }, { id: "8", invdate: "2007-10-03", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" }, { id: "9", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00"}];
for (var i = 0; i <= mydata.length; i++)
$("#celltbl").addRowData(i + 1, mydata[i]);
});
</script>
</head>
<body>
<h1>Double-Post on Cell Edit Bug</h1>
<table id="celltbl" class="scroll" cellpadding="0" cellspacing="0"></table>
</body>
</html>
02:59
Moderators
30/10/2007
Hello,
Thank you for the investigations.
Sorry, but I can not reproduce your issues using your example.
I will publish this exmple into the site in order to see what is.
Where you look for the double post?
Can not reproduce the second issue too.
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.
03:17
Moderators
30/10/2007
Hello,
Here is your code. Did you see something wrong? For me all work ok
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.
11:28
01/06/2009
Thanks for putting up the test page. I am seeing the same two problems on:
http://www.trirand.com/jqgrid3.....llbug.html
Let me try to explain the repros better...
#1) To see the double post problem... I forgot to mention that the easiest way to see the issue is to use FireBug's NET tab. Open up the above URL and enable FireBug. Edit a cell value and press <ENTER> and FireBug displays a single request. Edit a cell value and press <TAB> and FireBug displays two additional identical requests. (This isn't a FireBug oddity because you can see the double-post issue if you put a breakpoint in your server-side code, which is where I first noticed it.)
#2) To see the <input> problem... Enter "5" in Line 1 Amount and press <ENTER>. (Click OK on the error message due to the bogus cellurl. The problem still happens if it's a real URL that doesn't display an error.) You are in edit mode on Line 1 Tax. Click on Line 2 Tax. Line 1 Tax remains in edit mode. (Line 2 Tax is also in edit mode.) Click on Line 1 Tax again and you will see the value in the text box changes to <input ...>.
I've created a short screencast demonstrating the repro:
HTH, James
06:16
Moderators
30/10/2007
Hello James,
Thank you very much for this. I confirm that this is a bug in cellEdit. I will correct them as soon as possible.
Best Regards
and thanks again
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.
20:07
Moderators
30/10/2007
Hello,
Yes the bug is fixed.
Best 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.
Most Users Ever Online: 715
Currently Online:
38 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