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

Background and Foreground of treelistView Row

2 Answers 15 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Ishita
Top achievements
Rank 1
Ishita asked on 12 Sep 2014, 02:31 PM
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 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 12 Sep 2014, 04:24 PM
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.
 
0
Ishita
Top achievements
Rank 1
answered on 13 Sep 2014, 06:52 AM
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 ?!
Tags
TreeListView
Asked by
Ishita
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Ishita
Top achievements
Rank 1
Share this question
or