in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Databinding to TextEdit.Properties.ReadOnly

Last post 8/13/2008 10:50 AM by Andrew Backer. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 8/5/2008 10:12 PM

    Databinding to TextEdit.Properties.ReadOnly

     Hi,

    Im trying to databind a businessobject property to the Readonly property of the TextEdit Control (in a property call properties).

     

    Im using 8.2 devex

    He is a sample of what im trying to do

    BindingSource1.DataSource = GetType(UserProfile)

    BindingSource1.Add(_userProfile)

     

     

    Me.tbUserCode.DataBindings.Add(New Binding("text", Me.BindingSource1, "UserCode", True))

     

     

    Me.tbUserCode.DataBindings.Add(New Binding("Properties.ReadOnly", Me.BindingSource1, "UserCodeReadOnly", True))

    The last line is my issue - I can databind readonly because its "hidden" in Properties property of the TextEdit control.

     

    Help much appreciated

     

     

  • 8/12/2008 7:28 PM In reply to

    Re: Databinding to TextEdit.Properties.ReadOnly

    I've been trying to get something like this for ages, but AFAIK it isn't possible.  Unless they make "Properties" bindable and then you make a new binding source that points to ... arg, my head hurts already.


    It would be sweet.  I'm sure there is a way to do it with custom code, like creating a custom Binding derived class which knows about the properties class and, then binding to "ReadOnly" property.

    Hm... maybe I'll try something like that.

    //Andrew

  • 8/13/2008 10:50 AM In reply to

    Re: Databinding to TextEdit.Properties.ReadOnly

    I gave up :)  Perhaps if Binding implemented some interface, but I don't see how to do this with what is there.

    Having something like this would be REALLY nice.  Not sure how to make it possible, but it wouldn't be the first time we have needed it. 

    // Andrew

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED