Data Binding to custom properties.

Posted by Freddy Boisseau on 26-Nov-2008 10:59

I tried to do something which may not be allowed. I created a custom public property and then attempted to bind a column in my data source to that property. The visual designer allowed me to do this, but when I tried to run the code I got an error message. The field was defined as a integer field, and had a logic attached to the set of the property. So my question is two fold, can we do this? And if so how is it done? I am working around this now by using a hidden label for the binding.

All Replies

Posted by Admin on 26-Nov-2008 11:11

My feeling is, that it's not possible to do that. But what's the error message you are receiving? Beta or FCS?

Posted by Admin on 26-Nov-2008 11:16

The problem I see (from my limited insight to the bridge internals) is that on the .NET side of the bridge, a usercontrol is "just" a user control. The added ABL members are not visible over there.

And the actual databinding is happening on the .NET side of the bridge (where your property does not exist).

So the hidden label (I guess, you have added a TextChangedHandler) seems to a a very practical solution.

Posted by Freddy Boisseau on 26-Nov-2008 12:37

I believe that you are correct that the problem is the .Net side does not have access to the property I created on the ABL side. I am using the last beta release. The error message is 'System.ArgumentException: Cannot bind to the property 'postalSid' on the target control.'. It is just interesting that they appear in the list of properties in Advancing binding tool.

This thread is closed