<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Highlighting of selected row and drag and drop issue.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>DroidDr on Highlighting of selected row and drag and drop issue.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p18119</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p18119</guid>
        	        	<description><![CDATA[<p>I was pretty sure my row ids are unique. When I load data with my custom ajax request, the first id is 1 then 2, 3, 4, etc.</p>
</p>
<p>For now I solved the issue by doing this</p>
<p>- when drag starts, I remove all classes that do the highlighting of the row</p>
<p>- I deselect the selected row if any.</p>
<p>- I select the dragged row when dropped.</p>
</p>
<p>This works for now and fixes my issue.</p>
</p>
<p>Thanks again for the great work and help Tony.!</p>
]]></description>
        	        	<pubDate>Tue, 22 Jun 2010 01:20:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Highlighting of selected row and drag and drop issue.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p17592</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p17592</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I think that the problem here is that you have a rows with equall id&#39;s. This will cause this behaviour.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 30 May 2010 14:01:07 +0300</pubDate>
        </item>
        <item>
        	<title>DroidDr on Highlighting of selected row and drag and drop issue.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p17506</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/highlighting-of-selected-row-and-drag-and-drop-issue#p17506</guid>
        	        	<description><![CDATA[<p>Hi all,</p>
</p>
<p>I am building a grid that is not multi-select, with row drag and drop enabled, using the .sortableRows() function.</p>
</p>
<p>The problem is that when I have a selected row, and I drag another row that is not the selected one, when I finish dragging it to its detination and select it, the previous selected one remains highlighted, and the new selected one is also highlighted.</p>
</p>
<p>When I use &#39;jQuery("#grid_sched1").getGridParam("selrow")&#39; it returns the newest selected (and highlighted) row, as it should.</p>
<p>This problem happens only when I drag the row &#39;through&#39; the highlighted one. It looks like maybe it forgets or gets confused as to which row is highlighed and does not un-highlight it.</p>
</p>
<p>For testing I am using jquery 1.4.2, jquery ui 1.81, jqgrid 3.6.5.</p>
</p>
<p>I had the same problem using jqgrid 3.4.1 using tablednd. (this is why I did a test on the latest versions).</p>
</p>
<p>Does anyone have an idea on how I can fix this?</p>
</p>
<p>Thanks and best wishes to all!</p>
</p>
<p>----------</p>
<p>here is the code to create the grid.</p>
<p>&#160;&#160;&#160; jQuery("#grid_sched1").jqGrid({ <br />&#160;&#160; &#160;&#160;&#160; &#160;//url: "",<br />&#160;&#160; &#160;&#160;&#160; &#160;//datatype: &#39;json&#39;,&#160;&#160;&#160;&#160;&#160; // how the data is given to us<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#39;local&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;width: 750,<br />&#160;&#160; &#160;&#160;&#160; &#160;height: 300,<br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;#&#39;,&#39;STD#&#39;, &#39;SUP.C.&#39;, &#39;GRADE&#39;,&#39;MIX&#39;,&#39;TONS REQ&#39;,&#39;TONS PROD&#39;,&#39;COMPL&#39;,&#39;DATE&#39;,&#39;INSTR&#39;],&#160;&#160;&#160;&#160; // names of columns <br />&#160;&#160; &#160;&#160;&#160; &#160;colModel :[<br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SEQ&#39;, index:&#39;SEQ&#39;, width:30, sortable: true},&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;STDNUM&#39;, index:&#39;STDNUM&#39;, width:40, sortable: false},&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SUPP_CODE&#39;, index:&#39;SUPP_CODE&#39;, width:40, sortable: false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;GRADE&#39;, index:&#39;GRADE&#39;, width:70, sortable: false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;MIX&#39;, index:&#39;MIX&#39;, width:40, sortable: false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;TONS_REQ&#39;, index:&#39;TONS_REQ&#39;, width:60, sortable: false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;TONS_PROD&#39;, index:&#39;TONS_PROD&#39;, width:60, sortable: false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;COMPL&#39;, index:&#39;COMPL&#39;, width:40, sortable: true}, <br />&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;DATE_REQ&#39;, index:&#39;CANC.&#39;, width:70, sortable: true}, &#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;INSTR&#39;, index:&#39;INSTR&#39;, width:200, align:&#39;right&#39;, editable: true, editrules:{ required: false }, edittype: &#39;textarea&#39;, sortable: false }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160; &#160;cellEdit: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;cellsubmit: &#39;clientArray&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;cellurl: &#39;&#39;, &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;//pager: jQuery(&#39;#pager&#39;),&#160;&#160;&#160;&#160;&#160;&#160;&#160; //pager bar<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum:30,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // number of records<br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[12,24],&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // change # or rows visible through grid<br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;SEQ&#39;,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // init sorting<br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: "asc",&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // init sort order<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // show total # of records in pager.<br />&#160;&#160; &#160;&#160;&#160; &#160;caption: &#39;PROD SCHEDULE&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;hidegrid: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;hiddengrid: false, <br />&#160;&#160; &#160;&#160;&#160; &#160;imgpath: &#39;jquery/jqgrid/themes/basic/images&#39;,&#160;&#160;&#160;&#160; // path to imgs.<br />&#160;&#160; &#160;&#160;&#160; &#160;//multiselect: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;loadComplete: function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert("init reason grid load");<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//addDelButtons(-1);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//update_reason_list();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert("test");<br />&#160;&#160; &#160;&#160;&#160; &#160;},</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;gridComplete: function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert(&#39;gridcomplete&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//jQuery("#grid_sched1").tableDnDUpdate();<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;beforeEditCell: function(rowid, cellname, value, iRow, iCol){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//beforeEditCell: function(rowid){rowid<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//creasonEditingCell = 1; creasonEditingRowid = rowid; creasonEditingICol = iCol; creasonEditingIRow = iRow;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert("before edit");<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;afterEditCell: function(rowid, cellname, value, iRow, iCol){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//beforeEditCell: function(rowid){rowid<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//creasonEditingCell = 1; creasonEditingRowid = rowid; creasonEditingICol = iCol; creasonEditingIRow = iRow;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert("after edit");<br />&#160;&#160; &#160;&#160;&#160; &#160;},&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;afterSaveCell: function(rowid, cellname, value, iRow, iCol){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//creasonEditingCell = 0; creasonEditingRowid = 0; creasonEditingICol = 0; creasonEditingIRow = 0;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert("after save");<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;onCellSelect: function(rowid){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//add_note(&#39;selected: &#39; + jQuery("#list").getGridParam("selrow")&#160; );<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//alert(&#39;selected: &#39; + (jQuery("#grid_sched1").getRowData(rowid)).SEQ );<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160;&#160; });<br />&#160;&#160; &#160;jQuery("#grid_sched1").sortableRows();</p>
]]></description>
        	        	<pubDate>Thu, 27 May 2010 22:56:45 +0300</pubDate>
        </item>
</channel>
</rss>