RadWindow and validation

2 posts, 1 answers
  1. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 27 Feb 2012 Link to this post

    I am having a bit of an issue with rad window and calling it from a imagebutton.

    My code looks like this:

    function openRadWin() {
            radopen("./cvv.jpg", "RadWindow1");
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="500px"
                Height="260px" Title="CVV" Behaviors="Close" Modal="true" >
    <asp:ImageButton ID="ImageButton1" runat="server"
                    OnClientClick="openRadWin();" ImageUrl="~/question.jpg" Height="20px" Width="20px" />

    The issue i am having is that, when i click on the button, it causes validation. But if i add CauseValidation=False to my button, the window opens and closes immediately. It does not show the tool-bar at the top and does wait for end user action.
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3567 posts

    Posted 29 Feb 2012 Link to this post


    If you do not want to only to show a RadWindow and do so without causing validation I suggest you simply avoid the postback from the button:
    <asp:ImageButton ID="ImageButton1" runat="server" OnClientClick="openRadWin();return false;"
         ImageUrl="~/question.jpg" Height="20px" Width="20px" />

    This will also prevent it from validating the page.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top