﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Mon, 20 Dec 2010 04:24:29 GMT</pubDate><dc:creator>fabdellacorte</dc:creator><category>WebGrid</category><description>&lt;p&gt;Thank you, it is OK&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Sun, 19 Dec 2010 22:43:10 GMT</pubDate><dc:creator>MarTin</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use your custom form to override/replace the current form created by WebGrid. Try the following code:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnUnhandledError(controlId, tblName, lastRequestObject, errorString)
{
   var grid = ISGetObject(controlId);
   grid.SetIdle();
   grid.IsInProgress = false;
   grid.SetStatus1("", "ready", "CommonText/Ready")

   alert("Customize your error message with custom Form");
   return false;
}&lt;/pre&gt;
&lt;p&gt;The code above will invoke alert function which will create a dialogbox with a custom message. Therefore, you can use your own custom Form in here.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Fri, 17 Dec 2010 10:17:29 GMT</pubDate><dc:creator>fabdellacorte</dc:creator><category>WebGrid</category><description>&lt;p&gt;Thank you Martin,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;this the event that I look for but now I don't know replace not only the Message but put our custom form with message, may you tell I can do it.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;thanks very much&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Fri, 17 Dec 2010 05:12:55 GMT</pubDate><dc:creator>MarTin</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Use &lt;strong&gt;OnUnhandledError&lt;/strong&gt; Client-side event to catch the exception and put the following code:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnUnhandledError(controlId, tblName, lastRequestObject, errorString)
{
   var WebGrid1 = ISGetObject(controlId);

   window.setTimeout(function(){
   var errorMessage = document.getElementById("wg_ErrorMsg"); 
   errorMessage.innerText = "Customize your error messages";}, 10);
            
   return true;
}&lt;/pre&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Fri, 17 Dec 2010 04:38:40 GMT</pubDate><dc:creator>fabdellacorte</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Martin,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;sorry but I have forgot the attachment picture.&lt;/p&gt;
&lt;p&gt;I know how to use the Try-catch statement but I don't know where add it to intercet the following exception and the change the error message (in attachment). &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I add a new position in the WebGrid and the client is unabled to comunicate with server, now where I can put the your example (Try-catch statement)  to catch the exception, in any event ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I hope that I'm clear&lt;/p&gt;
&lt;p&gt;thanks&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Fri, 17 Dec 2010 04:15:33 GMT</pubDate><dc:creator>MarTin</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hello Fabrizio,&lt;/p&gt;
&lt;p&gt;You could try to use Try-catch statement in JavaScript.&lt;/p&gt;&lt;pre&gt;try
  {
  //Run some code here
  }
catch(err)
  {
  //Handle errors here
  }&lt;/pre&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>How intercept the throw exceptions  to customize the message to User</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-intercept-the-throw-exceptions-to-customize-the-message-to-User/</link><pubDate>Fri, 17 Dec 2010 04:00:34 GMT</pubDate><dc:creator>fabdellacorte</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi support,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;sometimes we have the exception in attachment, we would like if we could intercept the throw exception and so on customize the message.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;thanks in advanced&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Fabrizio&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>