- Home
- Forum
- React - EJ 2
- How to change Chevron Icon to custom icon in Tree view?
How to change Chevron Icon to custom icon in Tree view?
I need to change Chevron Icon to Plus or Minus icons in tree view, but could not find any option.
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
IL
Indhumathy Loganathan
Syncfusion Team
February 19, 2021 07:11 AM UTC
Hi Ameya,
Greetings from Syncfusion support.
We have validated your requirement in TreeView component. You can customize the TreeView expand and collapse icons by using the cssClass property of TreeView.
Please refer to the code snippets.
|
.custom.e-treeview .e-list-item .e-icon-expandable::before {
content: "\e823";
}
.custom.e-treeview .e-list-item .e-icon-collapsible::before {
content: "\e934";
}
.custom .e-list-item .e-icons.e-icon-collapsible {
transform: none;
} |
Please find the sample demonstrating the solution.
Please refer to the below links to know more about EJ2 TreeView component.
Documentation: https://ej2.syncfusion.com/react/documentation/treeview/
API Reference: https://ej2.syncfusion.com/react/documentation/api/treeview/
Please let us know if you need any further assistance.
Regards,
Indhumathy L
AK
ameya kelkar
February 22, 2021 11:19 AM UTC
Hi thanks for quick reply, but can we use TreeViewComponent in Gantt? I want to change icons in Gantt Chart.
MS
Monisha Sivanthilingam
Syncfusion Team
February 23, 2021 07:23 AM UTC
Hi Ameya,
We do not need to use the TreeView component in Gantt to change the icons. We have made use of the CSS classes of the expander and collapse icon to change them according to your needs. The following code snippets demonstrate the solution.
Index.css
|
.e-treegrid .e-treegridexpand::before {
content: "\e934";
}
.e-treegrid .e-treegridcollapse::before {
content: "\e823";
}
.e-treegrid .e-treegridexpand {
transform: none;
} |
We have prepared a sample for your reference.
Please contact us if you require any further assistance.
Regards,
Monisha.
Marked as answer
IA
ilyas aktas
October 2, 2021 10:26 AM UTC
If the icon of the root element in the treeview is users, if the icon of the child element is user, can you help me?
LA
Lokesh Arjunan
Syncfusion Team
October 4, 2021 10:13 AM UTC
Hi Ilyas aktas
Could you please elaborate on your requirement. We've listed some of the queries. Please clarify if your requirement is one of the following, if not, please share it with more details.
1. Whether need to render TreeView component in one of the columns in Gantt.
2. Whether need to render different icons for different parent levels for expand/collapse icons.
Regards,
Lokesh
SIGN IN To post a reply.
- 5 Replies
- 5 Participants
- Marked answer
-
AK ameya kelkar
- Feb 18, 2021 02:49 PM UTC
- Oct 4, 2021 10:13 AM UTC