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

SelectedImageUrl still not working

2 Answers 48 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 29 Jun 2012, 07:59 AM
Hello,
I`m using RadMenu, my custom skin.

Schema is: ImageUrl (image A), HoveredImage(image B), SelectedImage(image B). Unfortunately SelectedImage property won`t work. I was looking solution, couldn`t find.

<telerik:RadMenu ID="RadMenu1" runat="server" EnableEmbeddedSkins="False"
                      Skin="MyOwn"
                      EnableTextHTMLEncoding="True">
                      <Items>
                          <telerik:RadMenuItem runat="server" HoveredImageUrl="~/gfx/home_hover.png"
                              ImageUrl="~/gfx/home.png"
                              NavigateUrl="~/About.aspx"
                              SelectedImageUrl="~/gfx/home_hover.png">
                          </telerik:RadMenuItem>
                      </Items>
                  </telerik:RadMenu>

2 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 04 Jul 2012, 09:51 AM
Hi Marcin,

I tested the code that you pasted but I am not able to get the problematic behavior that you do. Please take a look at the video that I recorder as it demonstrates how the menu behaves from my side. Here is also the code that I used for testing:
<telerik:RadMenu ID="RadMenu1" runat="server" EnableEmbeddedSkins="False" Skin="MyOwn"
            EnableTextHTMLEncoding="True">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Item1" HoveredImageUrl="~/images/Completed.png" ImageUrl="~/images/Cut.png"
                    SelectedImageUrl="~/images/Failed.png">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Item2" HoveredImageUrl="~/images/Completed.png" ImageUrl="~/images/Cut.png"
                    SelectedImageUrl="~/images/Failed.png">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>

Greetings,
Kate
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.
0
Marcin
Top achievements
Rank 1
answered on 04 Jul 2012, 11:09 AM
Problem was "NavigateURL". I`ve managed to do in C#:

protected void Page_Load(object sender, EventArgs e)
        {
            RadMenu1.Items[(int)Session["target"]].Selected = true;
            int test = Session.Timeout;
        }


protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            if (e.Item.Value == "Value1")
            {
                Session["target"] = 1;
                Response.Redirect("~/invoice/view_invoice_cost.aspx");
            }
            if (e.Item.Value == "Value2")
            {
                Session["target"] = 2;
                Response.Redirect("~/invoice/view_invoice_revenue.aspx");
            }
        }
Tags
Menu
Asked by
Marcin
Top achievements
Rank 1
Answers by
Kate
Telerik team
Marcin
Top achievements
Rank 1
Share this question
or