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

Setting Alternate Row Style

5 Answers 147 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Jared Pinchot
Top achievements
Rank 1
Jared Pinchot asked on 08 Jan 2010, 09:46 PM
Is it possible to set the alternate row style for the tree list view? I have been unable to figure out how. The control doesnt seem to have the AlternationCount property (like the GridView) or a specific style property to do so.

5 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 12 Jan 2010, 09:43 AM
Hello Jared Pinchot,

Currently there is only the

AlternateBackground


property on the TreeListViewItem that sets the background of every second item. Since it does not exist on the TreeListView yet, it can be set using the ItemContainerStyle property on the TreeListView.

Are there other properties that you would like to change in alternating rows that will make an alternating style necessary?

Regards,
Miroslav
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.
0
Jared Pinchot
Top achievements
Rank 1
answered on 12 Jan 2010, 05:48 PM
This should be what I need to style our tree list view to look like our GridViews.

I'll give it a shot, thanks.
0
FantasmaWeb
Top achievements
Rank 1
answered on 04 Jun 2010, 08:35 PM
Please can you post an example?? or how can i create a copy of the ItemContainerStyle to change the alternate row style

 Regards

    Cesar From Mexico
0
Miroslav
Telerik team
answered on 09 Jun 2010, 11:39 AM
Hi FantasmaWeb,

In this case you may need to use an ItemContainerStyleSelector which will select the appropriate style for the given row.

Please note that the next version of the TreeListView will be based on the GridView where the alternating style will be defined like so:

http://www.telerik.com/help/silverlight/radgridview-rows-alternating-rows.html

Sincerely yours,
Miroslav
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.
0
FantasmaWeb
Top achievements
Rank 1
answered on 09 Jun 2010, 06:12 PM
Hellos Miroslav

  I resolved the problem, just setting the next style

 

 

<Style x:Key="myItemContainerStyle"

 

 

TargetType="telerikNavigation:RadTreeViewItem" >

 

 

 

<Setter Property="Foreground" Value="Black"/>

 

 

 

<Setter Property="Background" Value="#FFEDEDED"/>

 

 

 

 

</Style>

 



and setting the style in the item style container

<

 

telerikNavigation:RadTreeListView IsDragDropEnabled="False"

 

 

IsDragPreviewEnabled="False"

 

 

IsDragTooltipEnabled="False"

 

 

SelectionMode="Single"

 

 

IsSingleExpandPath="False"

 

 

IsExpandOnSingleClickEnabled="False"

 

 

IsEditable="False"

 

 

IsTabStop="True"

 

 

Grid.Row="2"

 

 

 

IsLineEnabled="True"

 

 

ItemContainerStyle="{StaticResource myItemContainerStyle}"

 

 

x:Name="RadTreeListView1">

 



Regards
 
     Cesar :D

 

Tags
TreeListView
Asked by
Jared Pinchot
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Jared Pinchot
Top achievements
Rank 1
FantasmaWeb
Top achievements
Rank 1
Share this question
or