<?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: jqGrid insert jquery ui dialog?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-insert-jquery-ui-dialog</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/jqgrid-insert-jquery-ui-dialog/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Waldo on jqGrid insert jquery ui dialog?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-insert-jquery-ui-dialog#p29428</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-insert-jquery-ui-dialog#p29428</guid>
        	        	<description><![CDATA[<p>Can someone give some guidance on using a jqGrid inside a jQuery dialog? &#160;I&#39;ve got the grid loading when the dialog is first opened, but have the following problems:</p>
<p>It&#39;s not possible to type in the grid add row and edit row dialogs. &#160;The delete dialog, which requires only mouse clicks (no typing) works fine.</p>
<p>The grid loads the first time the dialog is opened, but after that, the dialog opens empty.</p>
<p>I&#39;m new to both jQuery and jqGrid so I could be missing something obvious. &#160;I greatly appreciate your help!</p>
<p>Here&#39;s my html:</p>
<p>&#60;img id="btnNotes" alt="" src="images/Button_notes.gif" /&#62;</p>
<p>&#60;div id="DialogDiv"&#62;</p>
<p><span style="white-space:pre"> </span>&#60;table id="AppNoteList" &#62;&#60;/table&#62;</p>
<p><span style="white-space:pre"> </span>&#60;div id="tabPagerBar" &#62;&#60;/div&#62;&#160;</p>
<p>&#60;/div&#62; &#160; &#160; &#160; &#160;</p>
<p>The jQuery is:</p>
<p>var dlg;</p>
<p>$(document).on("click", "#btnNotes", function () {</p>
<p>dlg = $(&#39;#DialogDiv&#39;).dialog({</p>
<p>autoOpen: false, draggable: true, closeOnEscape: false, resizable: true, position: "center",</p>
<p>dialogClass: &#39;DynamicDialogStyle&#39;,</p>
<p>modal: true,</p>
<p>open: function () {</p>
<p>$("#AppNoteList").jqGrid({</p>
<p>datatype: function (pdata) {</p>
<p>AjaxGetAppNotes();  // JSON call; this is working fine and grid loads correctly.</p>
<p>},</p>
<p>colName: [&#39;AppNotesId&#39;, &#39;DateStamp&#39;, &#39;Note&#39;],</p>
<p>colModel: [</p>
<p>{ name: &#39;AppNotesId&#39;, key: true },</p>
<p>{ name: &#39;DateStamp&#39; },</p>
<p>{ name: &#39;Note&#39;, width: 400, editable: true, edittype: &#39;textarea&#39;, editoptions: { rows: "5", cols: "60"} }</p>
<p>],</p>
<p>rowNum: 10,</p>
<p>rowList: [10, 20, 30],</p>
<p>pager: &#39;#tabPagerBar&#39;,</p>
<p>sortname: &#39;DateStamp&#39;,</p>
<p>viewrecords: true,</p>
<p>sortorder: "desc",</p>
<p>caption: "Applicant Notes"</p>
<p>});</p>
<p>$("#AppNoteList").jqGrid(&#39;navGrid&#39;, &#39;#tabPagerBar&#39;, { reloadAfterSubmit: true, edit: true, add: true, del: true },</p>
<p>//edit options</p>
<p>{url: &#39;DataAccess.asmx/updateAppNotes&#39;, closeAfterEdit: true, editData: { "AppId": "2319957"} }, // AppId hardcoded for example</p>
<p>//add options</p>
<p>{url: &#39;DataAccess.asmx/updateAppNotes&#39;, closeAfterAdd: true, editData: { "AppId": "2319957"} },  // AppId hardcoded for example</p>
<p>//delete options</p>
<p>{url: &#39;DataAccess.asmx/delAppNote&#39; }</p>
<p>);</p>
<p>},</p>
<p>close: function (e) {</p>
<p>$(this).empty();</p>
<p>$(this).dialog(&#39;destroy&#39;);</p>
<p>},</p>
<p>height: 350,</p>
<p>width: 800,</p>
<p>title: &#39;App Notes&#39;</p>
<p>});</p>
<p>dlg.dialog("open");</p>
<p>});</p></p>
]]></description>
        	        	<pubDate>Sat, 31 Aug 2013 08:23:18 +0300</pubDate>
        </item>
</channel>
</rss>