cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Blank Gallery - highlight selected item

Hello Team, I have used the blank gallery and have multiples columns to it by grouping the column. Now I want to highlight the selected row. It looks pretty easy in data table control but no in the gallery. Can you please help?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Blank Gallery - highlight selected item

Hi@vshah2,

Could you please share more about your scenario? Is there a grouped gallery?

Based on the issue that you mentioned, do you want to select a row in a grouped gallery and highlighted it?

If there is a normal gallery without being grouped, you can use the formula @KrishnaV provided. If there does exist a grouped gallery, we have to do something different.

According to my assumptions, there is a nested gallery in your app. Select one row in a nested gallery that can’t be achieved currently. You can add a Checkbox inside to select the corresponding row.

I have a test on my side, please take a try as below.

  • Set the OnCheck property of the Checkbox as below

 

Set(SelectedRow, ThisItem.City)​

 

  • Set the Default property of the Checkbox as below

 

If(SelectedRow = ThisItem.City, true, false)​

 

  • Set the TemplateFill property of the nested gallery as below

 

If(Checkbox2.Value, RGBA( 28, 196, 220, 3), RGBA(0, 0, 0, 0))​

 

0005.gif

Best Regards,

Qi

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Blank Gallery - highlight selected item

Hi @vshah2 ,

 

Try this for template fill property of the gallery:

If(ThisItem.IsSelected,RGBA(22, 220, 220, 5), RGBA(242, 242, 242, 5))

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

Highlighted
Microsoft
Microsoft

Re: Blank Gallery - highlight selected item

Hi@vshah2,

Could you please share more about your scenario? Is there a grouped gallery?

Based on the issue that you mentioned, do you want to select a row in a grouped gallery and highlighted it?

If there is a normal gallery without being grouped, you can use the formula @KrishnaV provided. If there does exist a grouped gallery, we have to do something different.

According to my assumptions, there is a nested gallery in your app. Select one row in a nested gallery that can’t be achieved currently. You can add a Checkbox inside to select the corresponding row.

I have a test on my side, please take a try as below.

  • Set the OnCheck property of the Checkbox as below

 

Set(SelectedRow, ThisItem.City)​

 

  • Set the Default property of the Checkbox as below

 

If(SelectedRow = ThisItem.City, true, false)​

 

  • Set the TemplateFill property of the nested gallery as below

 

If(Checkbox2.Value, RGBA( 28, 196, 220, 3), RGBA(0, 0, 0, 0))​

 

0005.gif

Best Regards,

Qi

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Blank Gallery - highlight selected item

Hi@vshah2,

Have you solved your issue?

If it solves your request, Mark it as a Solution to enable other users to find it.

Best Regards,

Qi

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,343)