Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Double post on cell edit
07/07/2009
14:05
Avatar
JamesKovacs
Calgary, Alberta, Canada
Member
Members
Forum Posts: 8
Member Since:
01/06/2009
sp_UserOfflineSmall Offline

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/&#39;
      });

      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>

08/07/2009
02:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

08/07/2009
03:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Here is your code. Did you see something wrong? For me all work ok

http://www.trirand.com/jqgrid3.....llbug.html

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.

08/07/2009
11:28
Avatar
JamesKovacs
Calgary, Alberta, Canada
Member
Members
Forum Posts: 8
Member Since:
01/06/2009
sp_UserOfflineSmall Offline

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

10/07/2009
06:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

01/06/2010
18:07
Avatar
kci
New Member
Members
Forum Posts: 2
Member Since:
14/05/2010
sp_UserOfflineSmall Offline

Hello,

Is this error corrected?

02/06/2010
20:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information