how to bind one TextBox
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2008
Printed Date: 21-Apr-2026 at 10:14pm
Topic: how to bind one TextBox
Posted By: Oscar_Agreda
Subject: how to bind one TextBox
Date Posted: 27-Jul-2010 at 3:28am
Hello I have been looking how to bind one text box on IdeaBlade
I know the DataForm and DataGrid use ItemsSource="{Binding Employees}" Property
but my TextBox
<TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="1" Name="Employee_WorkPhoneTextBox" Text="{Binding Employee_WorkPhone}" VerticalAlignment="Center" Width="230" HorizontalContentAlignment="Left" IsTabStop="True" MaxLength="20"/>
Also tried my Prior Ria Binding , but it does not work either on IdeaBlade
<TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="1" Name="Patient_WorkPhoneTextBox" Text="{Binding Path=Emplyee_WorkPhone, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="230" HorizontalContentAlignment="Left" IsTabStop="True" MaxLength="20"/>
the DetailsGrid where this TextBox is located, is bound to <Grid DataContext="{Binding Employees}"
I followed http://www.ideablade.com/DevForceSilverlight/DevForceSilverlight_DevelopersTour.aspx
on the same form I have a DataGrid for testing purposes and I can see the data on the grid , but not in my TextBox
what I am doing wrong ?
IdeaBlade is pretty fast compared to Ria Services
Regards
|
Replies:
Posted By: Oscar_Agreda
Date Posted: 27-Jul-2010 at 3:43am
I also followed the SL4 Quickie with no Luck to bind just one TextBox for testing purposes
Because Ward creates a DataSource and then dragged and drop on the form, so I did the same for the TextBox, Drag and Drop,, but it did not work
http://www.ideablade.com/Videos/SilverlightQuickie/index.html
Regards
|
Posted By: GregD
Date Posted: 27-Jul-2010 at 11:05am
Have a look at one of the Mini-Demo apps, e.g., either the WPF or Silverlight version in the http://www.ideablade.com:8989/xwiki/bin/download/Documentation/Topic_BusObjPersistence/030BusObjPersistence.zip - Business Object Persistence Code Samples .
They have an extremely simple UI consisting basically of a TextBlock whose Text property is bound to a property in a viewmodel class.
|
|