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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Styling selected rows in a Repeater

chmaloof
7-Bedrock

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Aanjan
9-Granite
(To:chmaloof)

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'.

View solution in original post

6 REPLIES 6
Aanjan
9-Granite
(To:chmaloof)

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.

chmaloof
7-Bedrock
(To:Aanjan)

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?

Aanjan
9-Granite
(To:chmaloof)

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'.

chmaloof
7-Bedrock
(To:Aanjan)

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

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.

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.

Top Tags