Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#13392 closed defect (wontfix)

DojoGrid bug: cannot select row while setValue is being called.

Reported by: igoberman Owned by: Evan
Priority: blocker Milestone: 1.7
Component: DojoX Grid Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


if you try to select a row while setValue is being called on a store, selection will not take.

I have attached a simple test that demonstrates the problem. If you start the test, you can select the second row no problem. However, if the button is clicked and setValue is called, then the second row cannot be selected.

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" ""> <html> <head>

<script src="../thirdparty/dojo/1.6.1/dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script type="text/javascript" src="../thirdparty/log4js/log4js.js"></script>

<script type="text/javascript">

dojo.require(""); dojo.require("dojox.grid.DataGrid?");

var dojoData = { 'identifier': 'symbol', 'items': [{ 'symbol': 'IBM', 'name': 'IBM, inc.', 'trade': '10' }, { 'symbol': 'GOOG', 'name': 'GOOG, inc.', 'trade': '20'}] };

var value = 40; var log = new Log(Log.DEBUG, Log.popupLogger);

function setValue() {

dojoStore.setValue(dojoGrid.getItem(1), 'trade', + value++);


function setValueLoop() {

setValue(); setTimeout('setValueLoop();', 100);



<link rel="stylesheet" type="text/css" href=""/> <style type="text/css">

@import "../thirdparty/dojo/1.6.1/dojox/grid/resources/Grid.css"; @import "../thirdparty/dojo/1.6.1/dojox/grid/resources/claroGrid.css"; .dojoxGrid table { margin: 0; } html, body { width: 100%; height: 100%; margin: 0; }


<script type="text/javascript" src="../thirdparty/log4js/log4js.js"></script> <title>Dojo Grid</title>

</head> <body class="claro">

<input type="button" value="set value loop" onclick="setValueLoop(); return false;" />

<span dojoType="" jsId="dojoStore" data="dojoData"> </span>

<table dojoType="dojox.grid.DataGrid?" jsId="dojoGrid" store="dojoStore" autoHeight="true" columnReordering="true" selectionMode="single">



<th field="symbol" width="120px">


</th> <th field="name" width="120px">


</th> <th field="trade" width="120px">






</body> </html>

Change History (3)

comment:1 Changed 10 years ago by Evan

Owner: changed from evan to Evan

comment:2 Changed 10 years ago by Evan

Resolution: wontfix
Status: newclosed

This was already discussed at dojo forum

"... as the row node is kept updating all the time, the native 'click' event is not triggered - only 'mousedown' --> 'mouseup' and that's the reason why row is not selected when clicked."

"Browser just doesn't have chance to fire the 'click' event since the row node is updated so quickly. Not sure how this will be suitable in your scenario, but when I'm changing the data updating frequency from 0.1 second to 0.5 second, it's working well for me in FF3.5 - and I think 0.5 second shall be a acceptable refreshing frequency for most cases."

Don't think there are any workaround when < 0.5s which is more like a limitation of browser, so closing as won't fix, we can reopen this if got any better ideas.

Note: See TracTickets for help on using tickets.