I've got a form with a number of different controls (UltraTextBox for instance) that are bound to a data source. There's also a grid bound to the same datasource.
As I change values in the controls, I'm using the following code to update the datasource and display in the grid the values that were entered into the controls.
IF VALID-OBJECT(curControl:DataBindings) THEN curControl:DataBindings:WriteValue().
Included on the form are UltraCheckBoxes. These controls are bound using CheckedValue rather than Value. Now, in my code I have to test for a DataBinding type of CheckedValue as well as Value.
I'd like to just test for the first DataBinding item for the control (System.Windows.Forms.Control) using:
IF VALID-OBJECT(curControl:DataBindings[0]) THEN curControl:DataBindings[0]:WriteValue().
but this throws a syntax error stating that the "The specified indexer type does not match any type required by this object. (13811)".
In the class browser, the DataBindings collection shows both a character and integer property for retrieving the System.Windows.Forms.Binding from the collection object:
PUBLIC PROPERTY Item AS System.Windows.Forms.Binding
PUBLIC PROPERTY Item AS System.Windows.Forms.Binding
Is there something I'm not doing correctly with regard to the integer property that's causing it to not work?
Thanks,
JL
I remember having some issues with that as well. I don't remember exactly which part of the chained reference caused an issue, but this works for me. oControl is the reference to the actual Control.
[j][cPropertyName]
Mike,
Thanks! That worked perfectly.