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

RadToolBar button issue

0 Answers 73 Views
This is a migrated thread and some comments may be shown as answers.
chandan singh
Top achievements
Rank 1
chandan singh asked on 03 Jun 2012, 09:47 AM
Hi Team,
I am facing issue with RadToolBar button. I am trying to open ModalPopup extender on specific RadToolBar button but unable to do it.How I can do It. I want to handle it on JavaScript. Please find my code.
PopUp open when i click on any place on RadToolBar.Please provide me solution. 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace GridPopUpTest
    public partial class ParentForm : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ParentForm.aspx.cs" Inherits="GridPopUpTest.ParentForm" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<head runat="server">
    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server">
     <script type="text/javascript">
         function OnClientButtonClicking(sender, eventArgs) {
             var button = eventArgs.get_item();
             if (eventArgs.get_item().get_value() == "NoPopUp") {
             if (eventArgs.get_item().get_value() == "PopUp") {
         function ShowModalPopup() {
         function HideModalPopup() {
         function JobsRowSelected(sender, args) {
             var id = args.get_id();
             var inputCheckBox = $get(id).getElementsByTagName("input")[0];
             if (!inputCheckBox) {
             if (inputCheckBox.checked == true) {
                 inputCheckBox.checked = false;
             else {
                 inputCheckBox.checked = true;
        <telerik:RadToolBar ID="RadToolBar1" runat="server"   OnClientButtonClicking="OnClientButtonClicking">
            <telerik:RadToolBarButton Text="NoPopUp" Value="NoPopUp" ></telerik:RadToolBarButton>
            <telerik:RadToolBarButton Text="OpenpopUp"  Value="PopUp"></telerik:RadToolBarButton>
         <asp:Panel runat="server" ID="pnldtls">
                    <td><asp:TextBox ID="txtName" runat="server"></asp:TextBox></td>
                    <td><asp:Button ID="btnOk" Text="Ok" runat="server" /></td>
                    <td><asp:Button ID="btnCancel" Text="Cancel" runat="server" /></td>
          <cc1:modalpopupextender id="ModalPopupExtender1" runat="server" BehaviorID="ModalBehaviour1"
    cancelcontrolid="btnCancel" okcontrolid="btnOk" BackgroundCssClass="ModalPopupBG"
    targetcontrolid="RadToolBar1" popupcontrolid="pnldtls" DropShadow="false">

No answers yet. Maybe you can help?

Asked by
chandan singh
Top achievements
Rank 1
Share this question