<?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: i can only select the first row</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row</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/i-can-only-select-the-first-row/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on i can only select the first row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21687</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21687</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes ther is a diffrence I will say big difference</p>
<p>$("#list").addRowData(1,myRow);</p>
<p>This will add data in the grid with rows with same ID = 1.</p>
<p>In order to make correct selection please generate uniquie ID for every row</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 15 Jan 2011 21:02:34 +0200</pubDate>
        </item>
        <item>
        	<title>AverageGuy on i can only select the first row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21686</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21686</guid>
        	        	<description><![CDATA[<p>Note: in my case I&#39;m dynamically generating the grid via</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#list").addRowData(1,myRow);<br />if that makes any difference.</p>
</p>
<p>Jim.</p>
]]></description>
        	        	<pubDate>Sat, 15 Jan 2011 19:17:12 +0200</pubDate>
        </item>
        <item>
        	<title>AverageGuy on i can only select the first row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21685</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21685</guid>
        	        	<description><![CDATA[<p>I don&#39;t think that was the answer to the question in the title.&#160; I&#39;m having the same problem.&#160; I&#39;m printing the row ID via</p>
<blockquote>
<p>&#160;&#160;&#160; onSelectRow: function(rowId, stat){ <br />&#160;&#160;&#160;&#160;&#160; console.log("Row id "+rowId+" Status "+stat);<br />&#160;&#160; },</p>
</blockquote>
<p>And no matter what row I click on, every other click results in the rowId showing up as 1.&#160; At the same time row 1 background goes from normal to yellow and back.</p>
</p>
<p>Thanks,</p>
<p>Jim.</p>
]]></description>
        	        	<pubDate>Sat, 15 Jan 2011 19:11:48 +0200</pubDate>
        </item>
        <item>
        	<title>tony on i can only select the first row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21682</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21682</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You do not have the right id</p>
<p>Replace</p>
</p>
<p>while($row = ibase_fetch_assoc($result)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row[lfdnr];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;   $responce-&#62;rows[$i]</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ..............................</p>
<p>&#160;&#160;&#160; }</p>
<p>With</p>
<p>while($row = ibase_fetch_assoc($result)) {<br /><strong> &#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row["LFDNR"];<br /> </strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;   $responce-&#62;rows[$i]</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ..............................</p>
<p>&#160;&#160;&#160; }</p>
</p>
<p>Enjoy</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 15 Jan 2011 09:15:25 +0200</pubDate>
        </item>
        <item>
        	<title>Coolman1974 on i can only select the first row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21680</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-can-only-select-the-first-row#p21680</guid>
        	        	<description><![CDATA[<p>Hello together,</p>
<p>i have implementated the simple democode to show a jqGrid with jQuery in a HTML page.</p>
<p>The data type of the grid is json.</p>
<p>i collect the data from a firebird database of a php script.</p>
<p>here the html code:</p>
<p>Code:</p>
<p>...<br />&#60;div id="pagecontrol-opliste-tabelle"&#62;<br />&#160;&#160;&#160; &#60;table id="table-liste"&#62;<br />&#160;&#160;&#160; &#60;/table&#62;<br />&#160;&#160;&#160; &#60;div id="pager-liste"&#62;<br />&#160;&#160;&#160; &#60;/div&#62;<br />&#60;/div&#62;<br />...</p>
<p>here is the javascript code:</p>
<p>Code:</p>
<p>$(document).ready(function(){<br />&#160;&#160;&#160; $("#pagecontrol-opliste").tabs();<br />&#160; &#160;<br />&#160;&#160;&#160; $("#table-liste").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;Sql.php&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Lfd. Nr&#39;, &#39;Kategorie&#39;, &#39;Kunde&#39;, &#39;Stichwort&#39;, &#39;Ersteller&#39;, &#39;Bearbeiter&#39;, &#39;Status&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;lfdnr&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;lfdnr&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 55<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;kategorie&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;kategorie&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 90<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;kunde&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;kunde&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 100<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;stichwort&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;stichwort&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 80<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;ersteller&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;ersteller&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 80<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;bearbeiter&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;bearbeiter&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 80<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;status&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;status&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: 150,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortable: false<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [10, 20, 30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#39;#pager-liste&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;lfdnr&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: &#39;asc&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "OP Liste",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; scrollrows: true<br />&#160;&#160;&#160; });<br />&#160; &#160;<br />&#160;&#160;&#160; $("#table-liste").jqGrid(&#39;navGrid&#39;, &#39;#pager-liste&#39;, {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; edit: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; add: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; del: false<br />&#160;&#160;&#160; });&#160;&#160; &#160;<br />});</p>
<p>here is the php code:</p>
<p>Code:</p>
<p>&#60;?php<br />&#160;&#160;&#160; $page = $_GET[&#39;page&#39;]; // get the requested page<br />&#160;&#160;&#160; $limit = $_GET[&#39;rows&#39;]; // get how many rows we want to have into the grid<br />&#160;&#160;&#160; $sidx = $_GET[&#39;sidx&#39;]; // get index row - i.e. user click to sort<br />&#160;&#160;&#160; $sord = $_GET[&#39;sord&#39;]; // get the direction<br />&#160;&#160;&#160; if(!$sidx) $sidx =1;<br />&#160;&#160; &#160;<br />&#160;&#160;&#160; // connect to the database<br />&#160;&#160;&#160; $dbh = ibase_connect (&#39;localhost:C:xampphtdocsOPManagerDatabaseOPManager.GDB&#39;, &#39;SYSDBA&#39;, &#39;masterkey&#39;);</p>
<p>&#160;&#160;&#160; $stmt = &#39;SELECT count(*) FROM OP&#39;;<br />&#160;&#160;&#160; $result = ibase_query($dbh, $stmt);<br />&#160;&#160; &#160;<br />&#160;&#160;&#160; $row = ibase_fetch_assoc($result);<br />&#160;&#160;&#160; $count = $row["COUNT"];<br />&#160;&#160;&#160; //echo $count . "&#60;br&#62;";</p>
<p>&#160;&#160;&#160; if( $count &#62;0 ) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = ceil($count/$limit);<br />&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = 0;<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages;<br />&#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1)<br />&#160;&#160;&#160; //$start = 1;<br />&#160;&#160;&#160; $SQL = "SELECT FIRST $limit SKIP $start LFDNR, KATEGORIE, ERSTDATUM, STICHWORT, ERSTELLER, BEARBEITER, STATUS FROM OP ORDER BY $sidx $sord";<br />&#160;&#160;&#160; //echo $start . "-" . $limit . "&#60;br&#62;";<br />&#160;&#160;&#160; //echo $SQL . "&#60;br&#62;";<br />&#160;&#160;&#160; $result = ibase_query($dbh, $SQL);</p>
<p>&#160;&#160;&#160; $responce-&#62;page = $page;<br />&#160;&#160;&#160; $responce-&#62;total = $total_pages;<br />&#160;&#160;&#160; $responce-&#62;records = $count;<br />&#160;&#160;&#160; $i=0;<br />&#160;&#160;&#160; while($row = ibase_fetch_assoc($result)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row[lfdnr];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;cell&#39;]=array($row["LFDNR"],$row["KATEGORIE"],$row["ERSTDATUM"],$row["STICHWORT"],$row["ERSTELLER"],$row["BEARBEITER"],$row["STATUS"]);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++;<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160; echo json_encode($responce);<br />&#160;&#160; &#160;<br />&#160;&#160;&#160; ibase_close($dbh);&#160; &#160;<br />?&#62;</p>
<p>if i now try to select second or the third or .... for any time the first row was selected and deselected.</p>
<p>in the example on:</p>
<p><a href="http://trirand.com/blog/jqgrid/jqgrid.html" rel="nofollow" target="_blank">http://trirand.com/blog/jqgrid/jqgrid.html</a></p>
<p>it is possible to select any row and it is possible to search a record.<br />In my Grid i cant search for a record. After i click on search nothing is happend.</p>
<p>have anyone a idea what can i do?</p>
]]></description>
        	        	<pubDate>Sat, 15 Jan 2011 02:05:58 +0200</pubDate>
        </item>
</channel>
</rss>