Using the new dialog control...
Operation
There are two checkbox controls.
The first is called firstBox, the second is called secondBox.
The user makes a selection in firstBox and the choices in secondBox are filtered based on this selection.
Reference
Looking in the Xbasic properties of the checkbox control there is a property called: .v.CheckBox.cs.sql that contains the sql for the choices in the checkbox.
Tried Unsuccessfully
In the onChange event of firstbox, I am using a Xbasic function. I set a session value to the value selected in firstBox. The secondBox SQL is set to filter on the session variable. Couldn't find a way to refresh the checkbox control only.
Another idea
e._set.secondBox.v.CheckBox.cs.sql = "SOME SQL"
e._set.secondBox.CheckBox.cs.sql = "SOME SQL"
e._set.secondBox.cs.sql = "SOME SQL"
e._set.secondBox.sql = "SOME SQL"
Question
How can I set the choices available in a checkbox to be filtered dynamically? Is this case where the entire control would have to be replaced each time? For example, putting the checkbox in a <div> and then replacing the innerhtml of the div with the new checkbox values?
The choices are dynamic from a sql table so simply writing them to a javascript script is not practical.
Perhaps there is an easy way to do this that I am missing. Happens all the time with A5. Run all the way around the mulberry bush and there is a check box sitting somewhere.
Why this might matter
For mobile applications, it is easier for the user to press a checkbox then it is to use autosuggest or use a drop down menu. With a text field or drop-down menu, the interface shifts around to accommodate the keyboard or wheel. A list of checkboxes, particularly on a tablet, where there is ample room, allow the user to see all available choices.
Operation
There are two checkbox controls.
The first is called firstBox, the second is called secondBox.
The user makes a selection in firstBox and the choices in secondBox are filtered based on this selection.
Reference
Looking in the Xbasic properties of the checkbox control there is a property called: .v.CheckBox.cs.sql that contains the sql for the choices in the checkbox.
Tried Unsuccessfully
In the onChange event of firstbox, I am using a Xbasic function. I set a session value to the value selected in firstBox. The secondBox SQL is set to filter on the session variable. Couldn't find a way to refresh the checkbox control only.
Another idea
e._set.secondBox.v.CheckBox.cs.sql = "SOME SQL"
e._set.secondBox.CheckBox.cs.sql = "SOME SQL"
e._set.secondBox.cs.sql = "SOME SQL"
e._set.secondBox.sql = "SOME SQL"
Question
How can I set the choices available in a checkbox to be filtered dynamically? Is this case where the entire control would have to be replaced each time? For example, putting the checkbox in a <div> and then replacing the innerhtml of the div with the new checkbox values?
The choices are dynamic from a sql table so simply writing them to a javascript script is not practical.
Perhaps there is an easy way to do this that I am missing. Happens all the time with A5. Run all the way around the mulberry bush and there is a check box sitting somewhere.
Why this might matter
For mobile applications, it is easier for the user to press a checkbox then it is to use autosuggest or use a drop down menu. With a text field or drop-down menu, the interface shifts around to accommodate the keyboard or wheel. A list of checkboxes, particularly on a tablet, where there is ample room, allow the user to see all available choices.
Comment