Scenerio: Each row of the grid has two drop downs i.e. Region and State. On selecting region the state drop down shows states correponding to the region selected in the same row. Here is a design for accomplishing this.
Given the Main data source with a following schema:
Main
ABC(Repeating Group bound to the Grid on the form)
RegionValue ( drop down value selected by Region drop down is stored in this)
StateDropDown (create a repeating Group here below ABC)
StateNameDropDownValue
StateNameDropDownDisplay
Now you need to have custom code to fill in the values for StateDropDown repeating group elements StateNameDropDownValue and StateNameDropDownDisplay thru "code"for in the given row.
Change the state Drop down to bind to the repeating group StateDropDown elements i.e. value to StateNameDropDownValue and Display Name to StateNameDropDownDisplay.
This fixes that issue however has one small disadvantage i.e.
The listitems for each state drop down will be stored along with InfoPath XML file so little more space is occupied in the persisted data.
Mo
No comments:
Post a Comment