I have a data-aware Form with a Table Control and a Text Box. As the user selects a cell in the Table Control, I would like to update the Text Box to permit the user to view the contents of the selected cell in an "expanded" view. Thus far, I have used the following code to set the DataField property of the Text Box's model. But it appears that the BoundField property (references the Column in the Form to which the DataField originally referred) does not get updated automatically. Am I doing something wrong?
Code: Select all
'PURPOSE.........To update the fieldTxtBx to match the column selected
'AUTHOR..........James Wilmoth (...@gmail.com)
'DATE MODIFIED...2009-05-10
SUB communicationsTblCtrl_MOUSE_BUTTON_RELEASED(EVENT AS OBJECT)
'1. GET THE COLUMN.
source = event.source
currentColumnPosition = source.CurrentColumnPosition
form = Utilities.getParentForm(source)
column = form.Columns.getByIndex(currentColumnPosition)
'2. UPDATE THE DATAFIELD.
model = form.getByName("fieldTxtBx")
model.DataField = column.name
'3. RELOAD THE CONTROL.
'Not sure what to do here to refresh model.BoundField
END SUB