<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function clickHandler(sender, args) { args.set_cancel(true); } </script> </telerik:RadScriptBlock></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <div> <telerik:RadButton ID="btnTest" runat="server" Text="Test Me" OnClientClicking="clickHandler"></telerik:RadButton> </div> </form></body></html> <ClientSettings> <Scrolling AllowScroll="True" ScrollHeight="600px" UseStaticHeaders="false" /> </ClientSettings><MasterTableView DataKeyNames="Id,OrderId,SourceAreaId" EditMode="Batch" CommandItemDisplay="Top"><telerik:GridTableView runat="server" Name="OrderDetailsOfArea" EditMode="Batch" CommandItemDisplay="Bottom" DataKeyNames="Id" >Hello all,
I have a little problem: I have a modal popup that opens whenever the user click radbutton..I'm trying to open the modal popup from the code behind if the user click on the button how can I check if the user click on the button from the code behind?
(I don't want to use JS front code to open the modal popup)
*************code behind***********
Protected Sub GenerateLinks()
If Not String.IsNullOrEmpty(btnAddNewPerson.?????) Then
' ''Open RadWindow
Dim script As String = "function f(){$find(""" + modalPopup.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)
Exit Sub
End If
End Sub
***********aspx code***********
<telerik:RadButton ID="btnAddNewPerson" runat="server" Visible="false" ClientIDMode="Static" Text="Add Person" AutoPostBack="false" OnClientClicking="OnClientClicking"/>
<Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4" />
</telerik:RadButton>
******JS function*********
function OnClientClicking(button, args) {
window.location = button.get_navigateUrl();
args.set_cancel(true);
}
grdItemRules.DataSource = rules; grdItemRules.DataBind();foreach (GridDataItem item in grdItemRules.MasterTableView.Items){ GridTableView tableView = (GridTableView)item.ChildItem.NestedTableViews[0]; tableView.DataSource = rules[item.ItemIndex].RuleItems; tableView.DataBind();}