I am trying to open my radwindow from client-side but this window opens when I set my linkbutton onclientclick event handler, window is opening fine. But when I try to open my radwindow using Page.ClientScript I can't see my radwindow. Any help would be really appreciable. I don't want to set VisibleOnPageLoad=true because I have multiple radwindows and if any button clicks all window will appear in the screen.
<asp:LinkButton ID="lbAddCustomer" runat="server" >
</asp:LinkButton>
function showWindow() {
var oWindowCust = $find('<%= rwCustomer.ClientID %>');
oWindowCust.show();
}
<telerik:RadWindow ID="rwCustomer" runat="server" Title="Add Customer" VisibleStatusbar="false" OffsetElementID="lbAddCustomer"
Behaviors="Move,Pin,Resize" InitialBehaviors="Pin" VisibleOnPageLoad="false" Height="500" Width="510" Left="150px"
DestroyOnClose="true">
<%-- <Shortcuts>
<telerik:WindowShortcut CommandName="Hide" Shortcut="Esc" />
</Shortcuts>--%>
<ContentTemplate>
<%--<div id="Add Customer" style="text-align: center">--%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" width="30%">
<asp:Button ID="btnCustomerCloseWindow" runat="server" Text="Close Window" CausesValidation="False" OnClientClick="return CloseCustomerWindow();" />
</td>
<td id="tdbtnImportCustomer" runat="server" >
<asp:Button ID="btnImportCustomer" runat="server" Text="Import Customer from Stock System"
CausesValidation="false" />
</td>
<td id="tdbtnAddCustomer" runat="server">
<asp:Button ID="btnAddCustomer" runat="server" Text="Add Customer" CausesValidation="false" />
</td>
</tr>
</table>
</ContentTemplate>
</telerik:RadWindow>
Protected Sub lbAddCustomer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbAddCustomer.Click
Page.ClientScript.RegisterStartupScript(Me.GetType(), "key", "<script type='text/javascript'>showWindow();</script>", False)
End Sub
<asp:LinkButton ID="lbAddCustomer" runat="server" >
</asp:LinkButton>
function showWindow() {
var oWindowCust = $find('<%= rwCustomer.ClientID %>');
oWindowCust.show();
}
<telerik:RadWindow ID="rwCustomer" runat="server" Title="Add Customer" VisibleStatusbar="false" OffsetElementID="lbAddCustomer"
Behaviors="Move,Pin,Resize" InitialBehaviors="Pin" VisibleOnPageLoad="false" Height="500" Width="510" Left="150px"
DestroyOnClose="true">
<%-- <Shortcuts>
<telerik:WindowShortcut CommandName="Hide" Shortcut="Esc" />
</Shortcuts>--%>
<ContentTemplate>
<%--<div id="Add Customer" style="text-align: center">--%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" width="30%">
<asp:Button ID="btnCustomerCloseWindow" runat="server" Text="Close Window" CausesValidation="False" OnClientClick="return CloseCustomerWindow();" />
</td>
<td id="tdbtnImportCustomer" runat="server" >
<asp:Button ID="btnImportCustomer" runat="server" Text="Import Customer from Stock System"
CausesValidation="false" />
</td>
<td id="tdbtnAddCustomer" runat="server">
<asp:Button ID="btnAddCustomer" runat="server" Text="Add Customer" CausesValidation="false" />
</td>
</tr>
</table>
</ContentTemplate>
</telerik:RadWindow>
Protected Sub lbAddCustomer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbAddCustomer.Click
Page.ClientScript.RegisterStartupScript(Me.GetType(), "key", "<script type='text/javascript'>showWindow();</script>", False)
End Sub