This is a migrated thread and some comments may be shown as answers.

RadWindow and validation

1 Answer 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 27 Feb 2012, 11:30 AM
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">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="500px"
            Height="260px" Title="CVV" Behaviors="Close" Modal="true" >
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
 
<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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 29 Feb 2012, 03:25 PM
Hello,

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,
Marin
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.
Tags
Window
Asked by
Andrew
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or