More in this section

Forums / General Discussions / Widget Validation

Widget Validation

2 posts, 1 answered
  1. Matt
    Matt avatar
    56 posts
    20 Nov 2009
    21 Oct 2010
    Link to this post

    If I have a form with validators on the default view for my widget, I'm unable to publish from the backend page editor (causes validation, so it won't submit).  Is there a way to code my widget so that it doesn't show the form when I'm in the backend page editor?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    21 Oct 2010
    Link to this post
    Hi Matt,

    There is an extension that you can use IsDesignMode

    if (this.IsDesignMode())
        this.Controls.Add(new LiteralControl("You cannot preview this control in Design mode));

    All the best,
    Ivan Dimitrov
    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
2 posts, 1 answered