cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Styling selected rows in a Repeater

SOLVED
Highlighted
Level 8

Styling selected rows in a Repeater

The Repeater widget has an unusual default row selection indicator: a stylable rectangle at the left edge of the row.  We're going for a more standard, recognizable look, like darkening the background of the mashup displayed in the selected row, or giving the selected row a border.

Has anyone had experience with doing this?  I'm not even sure how I'd inform the selected row that it's selected, so that it could change its rendering.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Styling selected rows in a Repeater

Ah that's the RepeaterSelectedStyle property on the Repeater widget. You can easily create a custom style to just get a border around your cell by creating a new style with blanks for all colors except 'Line Color'.

6 REPLIES 6

Re: Styling selected rows in a Repeater

Chris, can you attach a screenshot for this? By default, the Repeater's overall style and cell styles can be customized at the widget level itself.

Re: Styling selected rows in a Repeater

repeater.png

Thanks for the quick reply!  Instead of the blue bar, we'd like to change the look of the repeated widget for the selected row.  Is there a way to do that?

Re: Styling selected rows in a Repeater

Ah that's the RepeaterSelectedStyle property on the Repeater widget. You can easily create a custom style to just get a border around your cell by creating a new style with blanks for all colors except 'Line Color'.

Re: Styling selected rows in a Repeater

I see, that's a good option.  Thanks!

Re: Styling selected rows in a Repeater

The RepeaterSelectedStyle and the RepeaterUnselectedStyle do not seem to work as you would expect in ThingWorx 7.1  Setting the background color for these styles only affects the bar at the beginning of the selected row as shown in the diagram above, not the entire repeater row.  How do you set the background color for the entire repeater row (selected and unselected)?  I want to change the background color of all the rows in the repeater, and use the row background color to designate selected instead of having the bar at the beginning of the row designate selected.

Re: Styling selected rows in a Repeater

Can't be done, I'm afraid.  (I've tried, at some length, at least in earlier versions.)  Repeater rows don't know whether they're selected and can't be reloaded individually from the outside.  The only options are the colored bar on the left, or the border around the selected row.