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

I want to change folders in treeview icon or color?

3 Answers 243 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 24 Feb 2016, 08:02 AM

Hi,

How to get to underlying css of folder icon in treeview?

This answer presented here doesn't help much:

http://www.telerik.com/forums/icon-override

The idea is to have different icon for differnt root folders.

thanks

3 Answers, 1 is accepted

Sort by
0
Joana
Telerik team
answered on 29 Feb 2016, 06:12 AM
Hello Robert,

In Lightweight RenderMode, RadFileExplorer uses font icons which might be easily customized via css. You could write selectors that fit your scenario. For example, the following code shows a dummy how to select only the root elements and change the color of the folder icon to Red.

<style type="text/css">
    .RadTreeView > ul > li > div >span
    {
        color: Red;
    }
    </style>
<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Height="600px" RenderMode="Lightweight">       
            <Configuration ViewPaths="~/, ~/FileExplorer" UploadPaths="~/"
            DeletePaths="~/"></Configuration>
        </telerik:RadFileExplorer>

A similar approach based on background images could be made for Classic RenderMode

Regards,
Joana
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Robert
Top achievements
Rank 1
answered on 01 Mar 2016, 04:22 PM

hi, I have tried your solution but I got red only an arrow used to expand folder.

Any reference somewhere about all css styles etc?

How to for instant second folder in tree make also a red ?

 

thanks

0
Joana
Telerik team
answered on 02 Mar 2016, 09:45 AM
Hello Robert,

My example was for root folders only. To modify the color for all TreeView arrows you could use the  following selector:

<style type="text/css">
    .RadTreeView ul li > div >span
    {
        color: Red;
    }
    </style>

In the developer toolbar of your browser you could inspect the treeview elements and apply css rules to any you want. Regarding css styles, here some articles that might be useful:


Regards,
Joana
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
FileExplorer
Asked by
Robert
Top achievements
Rank 1
Answers by
Joana
Telerik team
Robert
Top achievements
Rank 1
Share this question
or