Setting Alternate Row Style

6 posts, 0 answers
  1. Jared Pinchot
    Jared Pinchot avatar
    7 posts
    Member since:
    Dec 2009

    Posted 08 Jan 2010 Link to this post

    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.
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 12 Jan 2010 Link to this post

    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.
  3. DevCraft banner
  4. Jared Pinchot
    Jared Pinchot avatar
    7 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2010 Link to this post

    This should be what I need to style our tree list view to look like our GridViews.

    I'll give it a shot, thanks.
  5. FantasmaWeb
    FantasmaWeb avatar
    9 posts
    Member since:
    Jun 2006

    Posted 04 Jun 2010 Link to this post

    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
  6. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 09 Jun 2010 Link to this post

    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.
  7. FantasmaWeb
    FantasmaWeb avatar
    9 posts
    Member since:
    Jun 2006

    Posted 09 Jun 2010 Link to this post

    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

     

Back to Top
DevCraft banner