When clicking around in a grid (with multiselect set to false), the second row always retains the selected status.
oh, didn't mention that I'm using jquery 1.2.6, and latest of jqGrid (as of last week).
-Trevor
Hello Trevor,
Please check the id of the grid. Something is not good with the ids –
I mean some symbols or at least you have duplicated id's of the grid.
Remember – the id's should be uniquie.
Best Regards
Tony
tony said:
Hello Trevor,
Please check the id of the grid. Something is not good with the ids –
I mean some symbols or at least you have duplicated id's of the grid.
Remember – the id's should be uniquie.
Best Regards
Tony
Id of the grid or id for that row data?
I've simplified my html down to:
|
1 |
<span class="doctype"></span><br /><br /><<span class="start-tag">html</span>><br /><br /><<span class="start-tag">head</span>><br /><br /> <<span class="start-tag">meta</span><span class="attribute-name"> http-equiv</span>=<span class="attribute-value">"content-type" </span><span class="attribute-name">content</span>=<span class="attribute-value">"text/html;charset=iso-8859-1"</span>><br /><br /> <<span class="start-tag">link</span><span class="attribute-name"> rel</span>=<span class="attribute-value">"stylesheet" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/css" </span><span class="attribute-name">media</span>=<span class="attribute-value">"screen" </span><span class="attribute-name">href</span>=<span class="attribute-value">"jqGrid/themes/basic/grid.css" </span><span class="error"><span class="attribute-name">/</span></span>><br /><br /> <<span class="start-tag">link</span><span class="attribute-name"> rel</span>=<span class="attribute-value">"stylesheet" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/css" </span><span class="attribute-name">media</span>=<span class="attribute-value">"screen" </span><span class="attribute-name">href</span>=<span class="attribute-value">"jqGrid/themes/jqModal.css" </span><span class="error"><span class="attribute-name">/</span></span>> <br /><br /> <<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/javascript" </span><span class="attribute-name">src</span>=<span class="attribute-value">"scripts/jquery-1.2.6.js"</span>></<span class="end-tag">script</span>><br /><br /> <<span class="start-tag">script</span><span class="attribute-name"> src</span>=<span class="attribute-value">"jqGrid/jquery.jqGrid.js" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/javascript"</span>></<span class="end-tag">script</span>><br /><br /> |
|
1 |
<<span class="start-tag">script</span><span class="attribute-name"> src</span>=<span class="attribute-value">"jqGrid/js/jqModal.js" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/javascript"</span>></<span class="end-tag">script</span>><br /><br /> <<span class="start-tag">script</span><span class="attribute-name"> src</span>=<span class="attribute-value">"jqGrid/js/jqDnR.js" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/javascript"</span>></<span class="end-tag">script</span>><br /><br /> <br /></<span class="end-tag">head</span>><br /><br /><<span class="start-tag">body</span>><br /><br /><<span class="start-tag">div</span><span class="attribute-name"> style</span>=<span class="attribute-value">"position: absolute; left: 0px; top: 30px; right: 0px; bottom: 10px; overflow: auto;"</span>><br /><br /> <<span class="start-tag">table</span><span class="attribute-name"> id</span>=<span class="attribute-value">"list" </span><span class="attribute-name">class</span>=<span class="attribute-value">"scroll" </span><span class="attribute-name">style</span>=<span class="attribute-value">"width: 100%;"</span>></<span class="end-tag">table</span>><br /><br /></<span class="end-tag">div</span>><br /><br /><br /><<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/javascript"</span>><br /><br /><br />function setupGrid( columninfo /* array of { title, name, width } */)<br /><br />{<br /><br /> var colNames = [ ];<br /><br /> var colModel = [ ];<br /><br /> for(var i = 0; i < columninfo.length; i++)<br /><br /> {<br /><br /> colNames.push( columninfo<i>.title );<br /><br /> var cm = { name: columninfo</i><i>.name, index: columninfo</i><i>.name, width: columninfo</i><i>.width * 12, sortable: columninfo</i><i>.sortable };<br /><br /> if ( cm.name == "__icon" ) cm.resizable = false;<br /><br /> colModel.push( cm );<br /><br /> }<br /><br /> jQuery("#list").jqGrid(<br /><br /> {<br /><br /> url:"GetGroupMembers.do",<br /><br /> datatype: 'json',<br /><br /> mtype: 'GET', <br /><br /> colNames: colNames,<br /><br /> colModel: colModel,<br /><br /> pager: jQuery('#pager'),<br /><br /> rowNum:50,<br /><br /> hidegrid: false,<br /><br /> height: "auto",<br /><br /> shrinkToFit: false,<br /><br /> rowList:[10,20,30,50,100,200],<br /><br /> sortname: colModel[1].index,<br /><br /> sortorder: "desc",<br /><br /> viewrecords: true,<br /><br /> imgpath: 'jqGrid/themes/basic/images',<br /><br /> viewrecords: true,<br /><br /> multiselect: false,<br /><br /> }<br /><br /> );<br /><br />}<br /><br />jQuery(document).ready(<br /><br /> function()<br /><br /> {<br /><br /> $.getJSON("GetGroupColumnInfo.do", function(data)<br /><br /> {<br /><br /> setupGrid(data.columninfo);<br /><br /> } );<br /><br /> }<br /><br />);<br /><br /></<span class="end-tag">script</span>><br /><br /></i> |
|
1 |
</<span class="end-tag">body</span>><br /><br /></<span class="end-tag">html</span>><br /><br /><br /><br /> |
My column definition data can be viewed at http://www.eci-usa.net/jqgrid/coldata.txt and the rowdata is at http://www.eci-usa.net/jqgrid/jsondata.txt
The id of each row is being generated by a auto-inc number on the serverside (for testing), so its just 0…rowcount.
My column definitions do have spaces in the column name, dunno if thats relavant.
-Trevor
My brain hasn't been working full speed recently, so I apologize for not including this piece of info earlier:
I can also reproduce this under IE7.
Hello,
The links that you provide here are not valid.
Also I apologize for this, but you should check the id's of the
returned rows. Some row ids may have same value or something
not correct. Also provide me a link to the proble, to tell you what is wrong
here
Best Regards
Tony
My bad.
Hello,
In the jqGrid code there is no checking of if(rowdata[id])…
If this happens with the examples of the demo – so it is my bad.
If there are no id jqGrid begin to assign id's from 1.
So if you know that your id have 0 then you should perform additional
checking.
Best Regards
Tony
Well, maybe not exactly if (… ), but there is something equivilent.
Hello,
Thank you for this. Will be fixed. Never think that you use addRowData.
Regards
Tony
I don't directly use it.
Hello,
I hope that there are no more such code 
Regards
Tony
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top