<?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: help in selecting a select option in form editing mode</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-in-selecting-a-select-option-in-form-editing-mode</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/help-in-selecting-a-select-option-in-form-editing-mode/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>hollow on help in selecting a select option in form editing mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-in-selecting-a-select-option-in-form-editing-mode#p13462</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-in-selecting-a-select-option-in-form-editing-mode#p13462</guid>
        	        	<description><![CDATA[<p>Really weird, everything is working ok now. I can&#39;t figure out why though. I played a bit with the columns in the sql select statement (there were a couple of ids with the same name, from several tables, which I really didn&#39;t need). Maybe the php code which sent the xml to the grid, confused somehow these columns and I had some incosistent data.</p>
</p>
<p>Thank you!</p>
]]></description>
        	        	<pubDate>Wed, 30 Dec 2009 17:36:03 +0200</pubDate>
        </item>
        <item>
        	<title>hollow on help in selecting a select option in form editing mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-in-selecting-a-select-option-in-form-editing-mode#p13452</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-in-selecting-a-select-option-in-form-editing-mode#p13452</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>In my grid, among other columns, I have a student_id and student column, with the following config:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1313' value='Select Code' data-codeid='sfcode1313' /></p>
<div class='sfcode' id='sfcode1313'>name: &#39;student_id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;student_id&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; hidden:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; editable:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; editoptions:{<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; hidden:true<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</div>
<p><input type='button' class='sfcodeselect' name='sfselectit8310' value='Select Code' data-codeid='sfcode8310' /></p>
<div class='sfcode' id='sfcode8310'>&#160;name: &#39;student&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index: &#39;student&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; align: &#39;right&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; edittype:"select",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editoptions: {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; dataUrl:"note/get_students_in_class"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; editrules:{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; integer:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; minValue:0<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</div>
<p>When I choose to edit a student, it loads student_id as a hidden input and the the students in a select input. What I would like to do, is select the student I&#39;m about to edit. For this, I write:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3555' value='Select Code' data-codeid='sfcode3555' /></p>
<div class='sfcode' id='sfcode3555'>afterShowForm:function(frmid){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var student_id = $("#student_id").val();<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $("#student").val(student_id);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</div>
<p>For the first edit, it doesn&#39;t work (it doesn&#39;t select anything), but for subsequent edits it works fine. This might be because the first time it has to create the edit form. I also tried the events: beforeShowForm, but my intention was to delay as much as possible this code, so as to load the form.</p>
</p>
<p>Any suggestions? Thank you!</p>
]]></description>
        	        	<pubDate>Wed, 30 Dec 2009 11:25:09 +0200</pubDate>
        </item>
</channel>
</rss>