cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Selecting a Cell and Highlighting it in a Gallery

Hi

 

I have a gallery which has a a series of rows, one for each record.

Within each row I have a series of fields.

If a user clicks on a field, the OnSelect event fires.

THe user has requested that they want confirmation they have clicked on that field by that field being highlighted.

How can I do this ?  I can highlight a Row by the ThisIte,.IsSelected property, but what about an individual field ?

 

Thanks

 

Nigel

5 REPLIES 5
Highlighted
Skilled Sharer
Skilled Sharer

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP 

 

On the "Row", is it lables in galley or field?

 

Highlighted
Post Prodigy
Post Prodigy

Re: Selecting a Cell and Highlighting it in a Gallery

HI @panand99 

 

Each "Row" contains a series of fields.

 

If it would be easier if each "Row" was a series of Labels, that can be arranged.

 

REgards

 

Nigel

Highlighted
Community Support
Community Support

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP ,

Could you please share a bit more about your scenario?

Do you want to highlight the fields (Labels) within each item of your Gallery?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Within the Gallery, set the OnSelect proeprty of the Field1 (Label1) to following:

Select(Parent);Set(CurrentSelectedField, "Field1")

set the Color property of the Field1 (Label1) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field1",RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

set the OnSelect proeprty of the Field2 (Label2) to following:

Select(Parent);Set(CurrentSelectedField, "Field2")

set the Color property of the Field2 (Label2) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field2",RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

 

set the OnSelect proeprty of the Field3 (Label3) to following:

Select(Parent);Set(CurrentSelectedField, "Field3")

set the Color property of the Field3 (Label3) to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Field3", RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

...

...

Similar formulas for other Fields in your Gallery.

 

The GIF screenshot as below:Test.gif

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Post Prodigy
Post Prodigy

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @v-xida-msft 

 

I tried this for border of cell and got the screen enclosed.

 

You will notice I got the status column row rather than just the selected cell.

 

I got the red backgroud by using your formula on the Fill Property.

 

Is it possible to find out what column has been selected. ?

 

Effectively I want to create a Excel type of effect.

 

Regards

 

Nigel

 

Highlighted
Community Support
Community Support

Re: Selecting a Cell and Highlighting it in a Gallery

Hi @NigelP ,

Currently, there is no direct way to find out what column has been selected within your Gallery.

 

As an alternative solution, I think the solution I provided could achieve your needs. You could consider store the column name into a variable when you click the column in your Gallery.

E.G. set the OnSelect proeprty of the Status Label in your Gallery as below:

Select(Parent);Set(CurrentSelectedField, "Status")

set the Fill property of the Status Label to following:

If(ThisItem.IsSelected && CurrentSelectedField = "Status", RGBA( 220, 20, 60, 1 ), RGBA(0, 0, 0, 1))

...

...

then you could know which column you selected in your Gallery through the CurrentSelectedField variable.

 

Please consider take a try with above solution, then check if the issue is solved. If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

New Return to Workplace

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

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,559)