locked
TextBox Binding RRS feed

  • Question

  • Hi

    I have a WPF application in which I want to Bind a TextBox "txtfichier" to a field in a dataset row "_FILEP" But since "_FILEP" is of type varbinary nothing appears in the textBox.(I am using Blend)

    My code is:

    <TextBox Margin="101,75.17,314,0" x:Name="txtfichier" Text="{Binding Path= _FILEP}" VerticalAlignment="Top" TextWrapping="Wrap" TabIndex="3" Height="19.277"/>

    What can I do to display the content of _FILEP in the textBox (I want to convert _FILEP to varchar and then display it in the textbox)

    I tried :
    <TextBox Margin="101,75.17,314,0" x:Name="txtfichier" Tag="0" Text="{Binding Path= CAST(_FILEP AS VARchar(255))}" VerticalAlignment="Top" TextWrapping="Wrap" TabIndex="3" Height="19.277"/>

    But it didn't work

    Any help
    Monday, June 2, 2008 2:29 PM