<?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: Display Error Messages returned from server</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server</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/display-error-messages-returned-from-server/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10664</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10664</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please try to accept your message with a simple ajax calls - not using jqGrid?</p>
]]></description>
        	        	<pubDate>Mon, 12 Oct 2009 12:11:43 +0300</pubDate>
        </item>
        <item>
        	<title>chedebalakrishna on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10608</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10608</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>I have written the below code in my javascirpt file</p>
<p><span style="font-size: x-small;">Server Code :</span></p>
<p><span style="font-size: x-small;">-----------------</span></p>
</p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">try</span></span></p>
<p><span style="font-size: x-small;"></span></p>
<p>{</p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">if</span></span><span style="font-size: x-small;"> (!</span><span style="font-size: x-small; color: #2b91af;"><span style="font-size: x-small; color: #2b91af;">String</span></span><span style="font-size: x-small;">.IsNullOrEmpty(delIDs))</span></p>
<p>{</p>
<p>_rolesRepository.DeleteFunctionalAreaAdministrators(delIDs);</p>
<p>}</p>
<p>}</p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">catch</span></span><span style="font-size: x-small;"> (</span><span style="font-size: x-small; color: #2b91af;"><span style="font-size: x-small; color: #2b91af;">RulesException</span></span><span style="font-size: x-small;"> ex)</span></p>
<p>{</p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">throw</span></span><span style="font-size: x-small;"> </span><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">new</span></span><span style="font-size: x-small;"> </span><span style="font-size: x-small; color: #2b91af;"><span style="font-size: x-small; color: #2b91af;">Exception</span></span><span style="font-size: x-small;">(</span><span style="font-size: x-small; color: #a31515;"><span style="font-size: x-small; color: #a31515;">"User Attempted to delete the last functional area administrator"</span></span></p>
<p><span style="font-size: x-small;">);</span></p>
<p>Client Side JavaScript :</p>
<p>-----------------------------</p>
<p>loadError:</p>
</p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">function</span></span><span style="font-size: x-small;">(xhr, st, err) {</p>
<p></span></p>
<p><span style="font-size: x-small;">jQuery(</span><span style="font-size: x-small; color: #a31515;"><span style="font-size: x-small; color: #a31515;">"#rsperror"</span></span><span style="font-size: x-small;">).html(xhr.status + xhr.statusText +&#160; st+ err);</span></p>
<p><span style="font-size: x-small;">)</span></p>
<p><span style="font-size: x-small;">I see the below error on IE, Mozilla FireFox and Chrome</span></p>
<p><span style="font-size: x-small;"><span class="Apple-style-span" style="word-spacing: 0px; font: 16px &#39;Times New Roman&#39;; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 11px; color: #ff0000; line-height: 11px; font-family: Helvetica, Tahoma, Arial, Verdana, sans-serif;">500Internal Server ErrorNaNundefined</span></span></span></p>
<p><span style="font-size: x-small;"><span class="Apple-style-span" style="word-spacing: 0px; font: 16px &#39;Times New Roman&#39;; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 11px; color: #ff0000; line-height: 11px; font-family: Helvetica, Tahoma, Arial, Verdana, sans-serif;"><br />
</span></span></span></p>
<p><span style="font-size: x-small;">The actual error Message returned from server in the exception "Attempt to delete last administrator is failed".&#160; I should able to get this message from either of xhr, st or err objects.</span></p>
</p>
<p><span style="font-size: x-small;">Thanks,</span></p>
<p><span style="font-size: x-small;">Balakrishna.</span></p>
<p></p>
]]></description>
        	        	<pubDate>Fri, 09 Oct 2009 12:08:44 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10592</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10592</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I sugest you to use FireFox and do</p>
<p>loadError : function(xhr,st,err) {</p>
<p>console.log(xhr);</p>
<p>console.log(st);</p>
<p>console.log(err);</p>
<p>}</p>
<p>In order to see what you have from server</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 09 Oct 2009 04:27:43 +0300</pubDate>
        </item>
        <item>
        	<title>chedebalakrishna on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10575</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10575</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I tried the way you demonstrated.&#160; But its now working.&#160; I end up seeing a javascript error stating "Expected ) ".</p>
</p>
<p>I tried in a different way..</p>
</p>
<p>try&#160;</p>
<p>{</p>
<p>&#160;&#160; // something</p>
<p>}</p>
<p>catch (e)</p>
<p>{</p>
<p>&#160;&#160;&#160; throw new Excetion ("Error Message");</p>
</p>
<p>}</p>
</p>
<p>And in the JQuery query Grid&#160;, I used the below code.&#160; But I could not get the error Message returned from the server.&#160; Are there any properties with the "err" object, that can give the message sent from the server..?&#160; For time being I am hard coding the message in the Jquery grid.</p>
<p>loadError : function(xhr,st,err) {<br />&#160;&#160;&#160; jQuery(&#8221;#rsperror&#8221;).html("Meeage Hardcode here...But Message from server need to be dsiplayed");</p>
</p>
<p>Thanks</p>
<p>Balakrishna.</p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 18:19:42 +0300</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10561</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10561</guid>
        	        	<description><![CDATA[<p>In ASP.NET, you would just write directly to Response, then in case of error just End() the Response stream. Then, what is sent to client will be displayed by the grid, e.g.</p>
</p>
<p>try&#160;</p>
<p>{</p>
<p>&#160;&#160; // something</p>
<p>}</p>
<p>catch (e)</p>
<p>{</p>
</p>
<p>&#160;&#160; &#160;Response.Write(responseText);</p>
<p>&#160;&#160; &#160;Response.Flush();</p>
<p>&#160;&#160; &#160;Response.End();</p>
<p>}</p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 12:12:55 +0300</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10560</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10560</guid>
        	        	<description><![CDATA[<p>In ASP.NET, you would just write directly to Response, then in case of error just End() the Response stream. Then, what is sent to client will be displayed by the grid, e.g.</p>
</p>
<p>try&#160;</p>
<p>{</p>
<p>&#160;&#160; // something</p>
<p>}</p>
<p>catch (e)</p>
<p>{</p>
</p>
<p>&#160;&#160; &#160;Response.Write(responseText);</p>
<p>&#160;&#160; &#160;Response.Flush();</p>
<p>&#160;&#160; &#160;Response.End();</p>
<p>}</p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 12:10:38 +0300</pubDate>
        </item>
        <item>
        	<title>chedebalakrishna on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10559</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10559</guid>
        	        	<description><![CDATA[<p>Hi Rumen,</p>
<p>Thanks for the reply.</p>
<p>I looked at it and I did not understood.&#160; The code that I have posted above, is taken from the same example that you have refered.</p>
</p>
<p>I am using JSON string to populate the JQuery Grid.&#160; What I need is, &#160;in case some error occurs on server side, how can i send back that error in the JSON string so that the function pointed by &#8220;loadError&#8221; (in javascript)&#160;gets called.</p>
</p>
<p>Sorry..if i am not clear in explaining.</p>
</p>
<p>Thanks,</p>
<p>Balakrishna.</p></p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 11:25:53 +0300</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10539</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10539</guid>
        	        	<description><![CDATA[<p>There is an example demonstrating how you can control that</p>
<p>Visit our demos:</p>
<p><a href="http://trirand.com/jqgrid/jqgrid.html" target="_blank">http://trirand.com/jqgrid/jqgrid.html</a></p>
</p>
<p>Then click "New in Version 3.2", and then "Cotrolling Server Errors" to see an example how you can show custom error in the grid upon server error.</p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 01:43:51 +0300</pubDate>
        </item>
        <item>
        	<title>chedebalakrishna on Display Error Messages returned from server</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10533</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server#p10533</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I am using the JQuery Grid in ASP.NET MVC.&#160; How to display the Error Messages, for the Exceptions occured on the server side.</p>
<p>For any Exception occured on the server I need to display a message "Error while processing..please contact Administrator".&#160; This message is to be shown on top of the Grid.</p>
<p>In the demos i see the following code :</p>
<p>loadError : function(xhr,st,err) {<br />&#160;&#160;&#160; 	jQuery("#rsperror").html("Type: "+st+"; Response: "+ xhr.status + " "+xhr.statusText);</p>
</p>
<p>How we need to frame the JSON string when some error occurs on the server side, so that the function pointed by "loadError" gets called.</p>
<p>Appreciate, if you can share some sample code</p>
</p>
<p>Thanks,</p>
<p>Balakrishna.</p>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 00:34:54 +0300</pubDate>
        </item>
</channel>
</rss>