I created a gallery that I am using as a check list. I notice when I edit the gallery and use insert to create a control within the gallery, it creates the same control for each item on my list.
Current example:
I have a label I am using for testing purposes to get the value of a radio button control. When I click on fail, or pass in the radio button selection, it changes the value in my label to what is selected. This is fine.
The problem is that if I go to the second, third, etc item on the list, it changes the value in the label. I need my label to specifically get the control value from the first item on the list and only that value.
Then I want to make another label and that should only get the value of the second radio button value, and should not change the value if other buttons are changed and so on. Each item in my checklist should only be able to affect it's own radio control and receive that value
How would I accomplish this type of behavior? So far I have the following code:
label_Tester.Text = radio_Result_TS.Selected.Value
My radio button (radio_Result_TS) in the Gallery (Gallery_1) has the default code. OnSelect -> Select(Parent)
Thanks for any help or insight.
Solved! Go to Solution.
Hi @Anonymous :
Do you want to get the choice of redio control in the first and second items in the gallery.
The point is using
GalleryName.AllItems
I'v made a test for your reference:
1\Add a gallery(Gallery1)
2\Add a Radio control into this gallery(Radio2)
First item:
First(Gallery1.AllItems).Radio2.Selected.Value
Second item:
Last(FirstN(Gallery1.AllItems,2)).Radio2.Selected.Value
Best Regards,
Bof
Hi @Anonymous :
Do you want to get the choice of redio control in the first and second items in the gallery.
The point is using
GalleryName.AllItems
I'v made a test for your reference:
1\Add a gallery(Gallery1)
2\Add a Radio control into this gallery(Radio2)
First item:
First(Gallery1.AllItems).Radio2.Selected.Value
Second item:
Last(FirstN(Gallery1.AllItems,2)).Radio2.Selected.Value
Best Regards,
Bof
Thanks Bof worked like a charm and this is exactly what I am looking for thank you so much. I will also look into these functions more in the future to see what else they can do.
User | Count |
---|---|
253 | |
113 | |
92 | |
48 | |
38 |