cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andries1 Helper I
Helper I

DisplayMode.disabled after entrying data in gallery on each line item.

Is there a way you can Disable the displayMode of button of previous data entry in a Gallery?
This way we avoid the button or Icon being pressed more than once leading to unnecessary line items?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Hi @Andries1 ,

 

I think this cannot be achieved so far. Because if you insert a button in the template part of gallery, DisplayMode property set for the template part applies to all the buttons inside gallery control. So you cannot make different display mode for each button in each item inside a gallery control.

 

Regards,

Mona

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

View solution in original post

8 REPLIES 8
Super User
Super User

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Do you want to disable just the previous ones or all except the current one? If all, you can set the Display Mode of the gallery controls to something like this:

If(ThisItem.IsSelected, DisplayMode.Edit, DisplayMode.Disabled)

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Andries1 Helper I
Helper I

Re: DisplayMode.disabled after entrying data in gallery on each line item.

I tried that, but I'm still able to select the other buttons and action it. I'd like to disable all except the current one.

Andries1 Helper I
Helper I

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Also seem to be syntax error on my side, yet I did copyPaste your suggestion below.

Super User
Super User

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Can you tell me the error you're are getting?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Andries1 Helper I
Helper I

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Get the following error.

 

Untitled.png

Super User
Super User

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Where are you using this formula? Are you putting this in the DisplayMode of the gallery itself? If so, that's not what I was asking you to check. Put this in the DisplayMode of the controls within your gallery that you want disabled for all the rows that are not selected.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com
Andries1 Helper I
Helper I

Re: DisplayMode.disabled after entrying data in gallery on each line item.

So I entered the formula to the control per line and separately the lineitem but the control is still active irrespective if I'm on the selected item or not.

Community Support
Community Support

Re: DisplayMode.disabled after entrying data in gallery on each line item.

Hi @Andries1 ,

 

I think this cannot be achieved so far. Because if you insert a button in the template part of gallery, DisplayMode property set for the template part applies to all the buttons inside gallery control. So you cannot make different display mode for each button in each item inside a gallery control.

 

Regards,

Mona

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

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (5,444)