I use the following code for my gallery.TemplateFill = If(ThisItem.IsSelected=true, Red, Blue)
Everything works as it should until I refresh the gallery. Then the first row is automatically highlighted even though I haven't selected it.
How can I make sure that none of the rows are selected after refreshing the gallery?
Solved! Go to Solution.
Hi@dahlgebra,
Do you want to color the selected row when you select it?
It seems that this is designed by default. The Gallery will select the first row after reset by default.
As an alternative solution, you could create a variable to control this, please try the following workaround.
Add a Button1 and set the OnSelect property as below:
Reset(BrowseGallery1);Set(reset,true)
Set the Gallery TemplateFill property as below:
If(reset && ThisItem.IsSelected,Red,Blue)
Add another Button2 and set the OnSelect property as below:
Set(reset,false)
Note: When you reset the Gallery clicking Button1, the first row will be colored red always, you just need to click Button2 to remove this format. If you want to reselect, you could click Button1 to restart.
Best Regards,
Qi
Hi@dahlgebra,
Do you want to color the selected row when you select it?
It seems that this is designed by default. The Gallery will select the first row after reset by default.
As an alternative solution, you could create a variable to control this, please try the following workaround.
Add a Button1 and set the OnSelect property as below:
Reset(BrowseGallery1);Set(reset,true)
Set the Gallery TemplateFill property as below:
If(reset && ThisItem.IsSelected,Red,Blue)
Add another Button2 and set the OnSelect property as below:
Set(reset,false)
Note: When you reset the Gallery clicking Button1, the first row will be colored red always, you just need to click Button2 to remove this format. If you want to reselect, you could click Button1 to restart.
Best Regards,
Qi
User | Count |
---|---|
227 | |
101 | |
93 | |
56 | |
30 |
User | Count |
---|---|
288 | |
116 | |
110 | |
62 | |
58 |