Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FileExplorer > Dynamic RadToolBarButton Image Problem

Not answered Dynamic RadToolBarButton Image Problem

Feed from this thread
  • n/a avatar

    Posted on Apr 22, 2009 (permalink)

    Having a little trouble trying to create a dynamic button - if I add an image URL I simply get my image...

    tbBtn = New RadToolBarButton
    tbBtn.ImageUrl = "trans.gif"
    rfeMediaManager.ToolBar.Items.Add(tbBtn)
     

    As soon as I add a text value a default telerik refresh image appears...?

    tbBtn = New RadToolBarButton
    tbBtn.ImageUrl = "trans.gif"   
    tbBtn.Text = "Standard Mode"
    rfeMediaManager.ToolBar.Items.Add(tbBtn)

    How can I have only my own image and text?

    Reply

  • Tervel Tervel admin's avatar

    Posted on Apr 27, 2009 (permalink)

    Hello n/a,

    The RadFileExplorer's toolbar uses CSS sprites to reduce the number of images needed.
    Hence, to put a custom image + text on your custom button, you should go along the following lines:

    //In the code behind
    tbBtn.Text = "Standard Mode";
    tbBtn.CssClass = "CustomButton";
    FileExplorer1.ToolBar.Items.Add(tbBtn);

    //On the ASPX page
           <style>
            .CustomButton
            {
                border:1px solid red !important;
                /*  set background image here */ 
            }
            </style>



    Greetings,
    Tervel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • DGPunkt avatar

    Posted on Jan 13, 2010 (permalink)

    Hello,

    I have a very similar problem, but I tried your solution and it did not work.

    I have just that blank asp.net page with a fileexplorer:

    <

     

    telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="520px" Height="520px">

     

     

            <Configuration ViewPaths="~/" UploadPaths="~/" DeletePaths="~/" />

     

     

    </telerik:RadFileExplorer>

    In codebehind .cs file I just add a RadToolBarSplitButton to the fileexplorers toolbar and add some RadToolBarButtons to that splitbutton. I don´t want to see any (refresh-) images on these buttons. So codebehind looks like this:

     

    FileExplorer1.InitialPath = Page.ResolveUrl("~/");

    RadToolBarSplitButton radToolBarSplitButton = new RadToolBarSplitButton("Repository");
    radToolBarSplitButton.Buttons.Add(new RadToolBarButton("Demo"));
    radToolBarSplitButton.Buttons.Add(new RadToolBarButton("Manual"));
    FileExplorer1.ToolBar.Items.Add(radToolBarSplitButton);

    I tried your solution with "background-image:none;" in style part of aspx page, but nothing happened. Even if I set "background-image:test.jpg" a different image than refresh - image is not shown.

    AND

    As a second problem, the (refresh) image is shown in the background of the buttons text, not to it´s left. The funny thing is: This behaviour changes, if I put a RadToolBar on the page (right before the fileexplorer).

    I hope you can help.


    Greetings from Berlin, Germany

    Daniel

    Reply

  • Fiko Fiko avatar

    Posted on Jan 18, 2010 (permalink)

    Hello DGPunkt,

    I believe that this code library will be of help.

    Best wishes,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

    Reply

  • friendz 4u avatar

    Posted on Mar 26, 2010 (permalink)

    HI,
    I not being able to access the code library you have mentioned here.
    thanks
    Arpan

    Reply

  • Lini Lini admin's avatar

    Posted on Mar 26, 2010 (permalink)

    Hello Arpan,

    I have fixed the link in Fiko's post. Try accessing it again.

    Regards,
    Lini
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

    Reply

  • Ashok avatar

    Posted on Dec 20, 2011 (permalink)

    I have tried same code. But the refresh icon does not removed. sol give me good solution

    Reply

  • Ashok avatar

    Posted on Dec 20, 2011 (permalink)

    It's worked fine,
    Thanks

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > FileExplorer > Dynamic RadToolBarButton Image Problem
Related resources for "Dynamic RadToolBarButton Image Problem"

ASP.NET FileExplorer Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]