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

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

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.

Helper I
Helper I

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

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

Get the following error.

 

Untitled.png

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

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.

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

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,419)