This is a migrated thread and some comments may be shown as answers.
RadWebBrowserItem ScriptErrorsSuppressed
2 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
Developer Developer
Top achievements
Rank 1
Developer Developer asked on 16 Sep 2010, 09:09 PM
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!

2 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Sep 2010, 12:37 PM
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
0
Developer Developer
Top achievements
Rank 1
answered on 21 Sep 2010, 01:50 PM
That works great.  Thank you!
Asked by
Developer Developer
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Developer Developer
Top achievements
Rank 1
Share this question
or