I have a gallery with Items bound to Collection
{ QuestionId: 1 , NextQuestionYes:2, ParentQuestion: , Visible:1 , Answer: Yes/No}
{ QuestionId: 2 , NextQuestionYes:3, ParentQuestion1: , Visible:0 ,Answer: Yes/No}
{ QuestionId: 3 , NextQuestionYes:4, ParentQuestion: 2, Visible:0 ,Answer: Yes/No}
{ QuestionId: 4 , NextQuestionYes:, ParentQuestion: 3, Visible:0 ,Answer: Yes/No}
I would like to initially show Q1 and then when he answers Q1 with Yes, Question 2 will be shown along with Q1. When Q2 in answered with Yes , Q1,2,3 will be shown. If he answers No to Q1 then the brnaching stops there.
I will have multiple top level questions with user going through branching based on his answer.
How can we do this, I tried maintaining two collections and use the filtered collection with Visible = 1 as items to Gallery but it resets user answer after each refresh. Looking to see if we can use the original collection and somehow show or hide gallery item based on Visible property instead of filtering and creating a new collection.