a bug about contentMenu

2 posts, 0 answers
  1. C
    C avatar
    8 posts
    Member since:
    Apr 2013

    Posted 16 Sep 2013 Link to this post

     

    RadWindowManager2.RadConfirm("Server radconfirm: Are you sure?", null, 330, 180, null, "Server RadConfirm", null);it didn't work with "contentMenu"
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
            {
                int radGridClickedRowIndex;
                radGridClickedRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]);
                switch (e.Item.Text)
                {
     
                     
                    case "Delete":
                        RadWindowManager2.RadConfirm("Server radconfirm: Are you sure?", null, 330, 180, null, "Server RadConfirm", null);
                        SqlConnection con3 = AllClass.dbConnection();
                        string sd = "delete from tbPlan where PlanID=" + this.RadGrid2.MasterTableView.DataKeyValues[radGridClickedRowIndex]["PlanID"] + "";
                        AllClass.saveData(sd,con3);
                        show(this.RadDataPager1.CurrentPageIndex);
                        getcnt();
                        break;
     
                }
            }
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Oct 2013 Link to this post

    Hi C,

    Please have a look into the full code  that I tried.

    ASPX:
    <telerik:RadMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick">
        <Items>
            <telerik:RadMenuItem Text="Item1" runat="server">
                <Items>
                    <telerik:RadMenuItem Text="Item1.1" runat="server">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Item2" runat="server">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Item3" runat="server">
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>

    C#:
    protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
    {
        switch (e.Item.Text)
        {
            case "Item1": RadWindowManager1.RadConfirm("Item1", null, 300, 300, null, "Item1");
                break;
            case "Item2": RadWindowManager1.RadConfirm("Item2", null, 300, 300, null, "Item2");
                break;
            case "Item3": RadWindowManager1.RadConfirm("Item3", null, 300, 300, null, "Item3");
                break;
            default: RadWindowManager1.RadConfirm(e.Item.Text, null, 300, 300, null, "Items");
                break;
        }
    }

    Please elaborate your requirement if it doesn't help you.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top