<?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: jGrid confict with DNN</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jgrid-confict-with-dnn</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/jgrid-confict-with-dnn/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on jGrid confict with DNN</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jgrid-confict-with-dnn#p15723</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jgrid-confict-with-dnn#p15723</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not sure, but maybe you will need to post here</p>
<p><a href="http://www.trirand.net/forum/" rel="nofollow" target="_blank">http://www.trirand.net/forum/</a> - ASP.NET forum</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 20:25:54 +0200</pubDate>
        </item>
        <item>
        	<title>ivanchain on jGrid confict with DNN</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jgrid-confict-with-dnn#p15600</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jgrid-confict-with-dnn#p15600</guid>
        	        	<description><![CDATA[<p>hello,</p>
<p>I&#39;am still fighting with jqgrid in my DNN project, and I meet a Big Problem, like this:</p>
<p>Problem:<br />The jqgrid can only live in the Home Page of the DNN(Home page is the first page of dnn site, when you get on the site, the home page will be added firstly, then you could click the page tab, change to the other web pages). That means, if you put the jqgrid at any of the page out of the home page, it will crash when you load the page.</p>
<p>Repeat:<br />Your could repeat the problem simply like this:<br />1.Prepare a standard DNN(over 4.8).<br />2.Just make a simple user-design module, and put the jqgrid into it.<br />3. Put the module into a test page and point the test page as the home page (in the DNN site-setting), the jgrid will work fine.<br />4. now point another page as the home page, and you should click on the page tab to view the test page with jqgrid on it.&#160;You will see, the loading of the test page will fail, and you will see it report a lot of JS errors.</p>
<p>Reason:<br />I found the problem happend&#160;for the jqgrid try to load data when the DNN page is loading.&#160;All the JS&#160;errors is raised by the loadErrorHandler.</p>
<p>-----------------------------<br />function jqGrid_aspnet_loadErrorHandler(xht, st, handler) {jQuery(document.body).css(&#39;font-size&#39;,&#39;100%&#39;); jQuery(document.body).html(xht.responseText);}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var _theForm = document.getElementsByTagName(&#39;FORM&#39;)[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; jQuery(_theForm).submit( function() <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; <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; jQuery(&#39;#dnn_ctr620_View_jqGrid3_SelectedRow&#39;).attr(&#39;value&#39;, jQuery(&#39;#dnn_ctr620_View_jqGrid3&#39;).getGridParam(&#39;selrow&#39;));&#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; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />------------------------------<br />In the JS function of the loadErrorHandler, it try to do: jQuery(document.body).html(xht.responseText), this will report "Object expected" from the DNN&#39;s core code, because the DNN core code will maintain the page by it own way, you can not do jQuery(document.body).html(xht.responseText) here. That explained how the jqgrid loaderror lead a series JS errors in the DNN page and crashed the system, when it meet the loadError.</p>
<p>Now the problem is, why the jqgrid will give a loading error? I set ervery correctly, I write in the&#160; Sub OnInit() of the ascx&#160;like this:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim dt As New DataTable<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim dr As DataRow<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dt.Columns.Add("TableID")<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dt.Columns.Add("123")<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jqGrid3.DataSource = dt<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jqGrid3.DataBind()</p>
<p>Just like the demo told us to do.&#160; Yes, on the&#160;client-side&#160;JS, I set the jqgrid correctly too. Because&#160;this works fine when&#160;the&#160;page&#160;hold jqgrid is &#160;set as th home page of DNN.</p>
<p>But, when you just change the home page, that means, you need to click on the page tab to chose the "test page" to view, and the test page loading itself by DNN, you will see the jqgrid on it report the loadError. I have tested, at this situation,&#160;&#160;the sub OnInit() is be executed, so the databind() is&#160;exccuted. To make it more clearly,&#160;&#160;I deleted the code in the OnInit()&#160; and just set the DatasourceID in the ascx file where point to a SQL server datasource,&#160;and bind to &#160;the jqgrid like the demo set.</p>
</p>
<p>The result is the same, when you point to the page, the jqgrid still raise a loadingerror. And if you set the page as the home page of DNN, the jqgrid works fine again.&#160;</p>
<p>So I don&#39;t know why the jqGrid_aspnet_loadErrorHandler is raised at this situation, the code is the same, but only the page is the home page, or not.</p>
</p>
<p>And, I think jQuery(document.body).html(xht.responseText) can&#39;t be used, that will conflict with the DNN core code, that crashed the&#160;whole page. &#160;But the main problem is still &#160;why the loadErrorHandler is raised.</p>
<p>I am very anxious,&#160; I don&#39;t know if I should still try this....</p>
</p>
<p>yours,<br />Ivan</p>
]]></description>
        	        	<pubDate>Thu, 11 Mar 2010 11:34:07 +0200</pubDate>
        </item>
</channel>
</rss>