SelectedImageUrl still not working

3 posts, 0 answers
  1. Marcin
    Marcin avatar
    3 posts
    Member since:
    Mar 2011

    Posted 29 Jun 2012 Link to this post

    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. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 04 Jul 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marcin
    Marcin avatar
    3 posts
    Member since:
    Mar 2011

    Posted 04 Jul 2012 Link to this post

    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");
                }
            }
Back to Top