Hi,
I'm trying to create a code, when click on a button it will show check icon in Gallery.
I hope you can help me in this matter.
Thanks.
I think I found the solution 🙂
If click on the button -> add new record: CheckInButton = Yes
Set the Visible property of Icon to ThisItem.CheckInButton = "Yes"
if I press F5 to refresh app or close the app and open it again, the icon will be hidden. that is incorrect...
Hi @kinghnvn
I believe I found the solution that you were originally looking for
Set the OnSelect property of the Button to
If(Not(ThisItem.ID in ColItemSelected),Collect(ColItemSelected, {ID:ThisItem.ID}))
Set the Default property of Checkbox to
ThisItem.ID in ColItemSelected.ID
If you want to use Check Icon then Set the Visible property of Icon to
ThisItem.ID in ColItemSelected.ID
Result
Note:
1. We can use either CHeckbox control or Icon
2. Set Onvisible property of the screen to
Clear(ColItemSelected)
Thanks,
Stalin - Learn To Illuminate
Hi @kinghnvn
I'm not sure what you are trying here but with the gallery, we have 2 possibilities
1. Check the icon for the selected item/row
UpdateContext({varCheckIcon:true})
varCheckIcon && ThisItem.IsSelected
2. Check all items in the gallery
Set the Default property of Checkbox to
varCheckIcon
Result
If you want the second option then the button should be outside the gallery.
Thanks,
Stalin - Learn To Illuminate