I wrote to Selwyn to ask if there was a way to re populate a dropdown box when it gets the focus, and he very nicely responded with info below, but I'm not experienced enough to actually use it. Here's his info:
From Selwyn:----------------------------------------------------------
you can only repopulate a dropdown box using an ajax callback. here is an excerpt from the release notes.
Grid Component - New Method to Set Choices in DropdownBox Control - A new Grid method has been added to allow you to dynamically reset the choices in a DropdownBox control.
{Grid.object}.populateDropdownBox(part,columnName,rowNum,data,clearExisting)
part G or D (depending on whether the control is in the Grid or Detail View part
columnName Name of the field. (Must be uppercase)
rowNum Row number of the control. For Detail View is 1.
data Array of choices. Each entry in the array can be an item, or an array with a display and stored value.
Examples:
['alpha','beta','gamma']
[ ['alpha','a'], ['beta','b'], ['gamma','g']
clearExisting if true, the existing choices in the control are removed before the new choices are added
End of Selwyn info--------------------------------------------------
Here's some of my dropdown box Xbasic properties. Can anyone give me a clue as to how to fill in the line that Selwyn suggested for an ajax callback? I think he wants me to figure it out myself, but still learning....
DropDownBox.Datasource = "CS"
.DropDownBox.maxchoices = 0
.DropDownBox.CS.ConnectionString= "::name::DynamicConnection_CHS"
.DropDownBox.CS.SQL = "SELECT DISTINCT DOC_TYPE FROM TblDoxTypes ORDER BY DOC_TYPE"
.DropDownBox.DisplayValueField = "DOC_TYPE"
.DropDownBox.DisplayValueFieldType = "C"
From Selwyn:----------------------------------------------------------
you can only repopulate a dropdown box using an ajax callback. here is an excerpt from the release notes.
Grid Component - New Method to Set Choices in DropdownBox Control - A new Grid method has been added to allow you to dynamically reset the choices in a DropdownBox control.
{Grid.object}.populateDropdownBox(part,columnName,rowNum,data,clearExisting)
part G or D (depending on whether the control is in the Grid or Detail View part
columnName Name of the field. (Must be uppercase)
rowNum Row number of the control. For Detail View is 1.
data Array of choices. Each entry in the array can be an item, or an array with a display and stored value.
Examples:
['alpha','beta','gamma']
[ ['alpha','a'], ['beta','b'], ['gamma','g']
clearExisting if true, the existing choices in the control are removed before the new choices are added
End of Selwyn info--------------------------------------------------
Here's some of my dropdown box Xbasic properties. Can anyone give me a clue as to how to fill in the line that Selwyn suggested for an ajax callback? I think he wants me to figure it out myself, but still learning....
DropDownBox.Datasource = "CS"
.DropDownBox.maxchoices = 0
.DropDownBox.CS.ConnectionString= "::name::DynamicConnection_CHS"
.DropDownBox.CS.SQL = "SELECT DISTINCT DOC_TYPE FROM TblDoxTypes ORDER BY DOC_TYPE"
.DropDownBox.DisplayValueField = "DOC_TYPE"
.DropDownBox.DisplayValueFieldType = "C"
Comment