Background and Foreground of treelistView Row

3 posts, 0 answers
  1. Ishita
    Ishita avatar
    30 posts
    Member since:
    Nov 2013

    Posted 12 Sep 2014 Link to this post

    Hi, 
           I want to bind background colors and foreground colors to all rows coming from my database. 
    Please note that each row will have its own foreground and backgroundcolor according to database. 
    i tried using 
      private void radTreeListView_RowLoaded(object sender, RowLoadedEventArgs e)
            {        
                var row = e.Row as TreeListViewRow;
                row.Background = new SolidColorBrush(color);    // color is coming from database through some logic
            }
    This works but sometimes fails. 

    How can i bind background and foreground color of every row in treelistview ?

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Sep 2014 Link to this post

    Hi,

    You can achieve conditional formatting for the rows applying RowStyleSelector for RadTreeListView.


    Regards,
    Dimitrina
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Ishita
    Ishita avatar
    30 posts
    Member since:
    Nov 2013

    Posted 13 Sep 2014 Link to this post

    well, its like if i have 1000 rows then i might have 1000 forecolors ! 
    I cant create 1000 styles ! :( 
    Is there anyway to bind like we do have in row expanded ?!
Back to Top