cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted
Super User II
Super User II

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
Highlighted

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.

Highlighted
Helper I
Helper I

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

Highlighted

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
Highlighted

Get the following error.

 

Untitled.png

Highlighted

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
Highlighted

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.

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,104)