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

Zebra effect

1 Answer 125 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Alejandro Genovesi
Top achievements
Rank 2
Alejandro Genovesi asked on 12 Jun 2018, 02:56 PM

Hi, how can I disable de Zebra effect in the radtreelist. Is there any setting like "<ClientSettings EnableAlternatingItems="false">" of the RAdGrid?

 

If not, How can I disable the Zebra Effect?

 

Thanks

Alejandro

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 15 Jun 2018, 12:10 PM
Hi Alejandro,

The easiest way is to inspect the DOM, find the CSS class name for the alternating items (see inspectCode.png) and override its background property. For more information about the browser's DevTools, debugging tips and tricks you can check out the Improve Your Debugging Skills with Chrome DevTools blogpost.

Example CSS code to override the default style. (Note that this code will remove the background 
<style>
    div.RadTreeList .rtlA,
    div.RadTreeList .rtlR {
        background: unset;
    }
</style>

Here are some tips and tricks about CSS specifity/selectors, and overriding existing rules:

Another option is to adjusting the AlternatingItemStyle property of the RadTreeList, to make it the same color as the regular item.
<telerik:RadTreeList ID="RadTreeList1" runat="server">
     <AlternatingItemStyle BackColor="Transparent" />
</telerik:RadTreeList>

Attached you can find a sample webform page demonstrating the above.

Kind regards,
Attila Antal
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TreeList
Asked by
Alejandro Genovesi
Top achievements
Rank 2
Answers by
Attila Antal
Telerik team
Share this question
or