locked
Custom UserControl with DataBinding, not returning value? RRS feed

  • Question

  • Hi all, just a quick question. I have a custom control with a TextBox, Label and a ComboBox. All I want is to be able to select a binding source(for the TextBox) from the properties window when i use the control on a form. I have managed to get the controls Textbox to allow this using:

      <Bindable(True)>
      Public Property Code As String
        Get
          Return txtCode.Text.ToString
        End Get
        Set(value As String)
          txtCode.Text = value
        End Set
      End Property
    

     However, when i try to add a new record and save it, it is ruturning a null value.

    Any help would be much appreciated.

    Monday, June 27, 2011 7:40 PM

Answers