Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Rotator > RadWebBrowserItem ScriptErrorsSuppressed

Not answered RadWebBrowserItem ScriptErrorsSuppressed

Feed from this thread
  • Developer Developer avatar

    Posted on Sep 16, 2010 (permalink)

    I'm trying to suppress script errors in a RadWebBrowserItem.

    In System.Windows.Forms.WebBrowser there is a property named ScriptErrorsSuppressed, but I can't seem to find an equivalent in RadWebBrowserItem.

    Does anybody know if it's possible to suppress script errors in the RadRotator using a RadWebBrowserItem? 

    Thank you!

    Reply

  • Nikolay Nikolay admin's avatar

    Posted on Sep 21, 2010 (permalink)

    Hello Developer,

    Thank you for this question.

    You can get the WebBrowser control hosted in RadWebBrowserItem using reflection as the property returning this control is currently internal:
    RadWebBrowserItem item1 = new RadWebBrowserItem();
    Type t = typeof(RadWebBrowserItem);
    PropertyInfo pInfo = t.GetProperty("WebBrowserControl", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
    object o = pInfo.GetValue(item1, null);
    WebBrowser browser = (WebBrowser)o;
    browser.ScriptErrorsSuppressed = true;

    We will consider making the WebBrowserControl public in one of our next releases.

    I hope this helps.

    Greetings,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Developer Developer avatar

    Posted on Sep 21, 2010 (permalink)

    That works great.  Thank you!

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Rotator > RadWebBrowserItem ScriptErrorsSuppressed
Related resources for "RadWebBrowserItem ScriptErrorsSuppressed"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]