This is a migrated thread and some comments may be shown as answers.

Find Textbox inside datatemplate

0 Answers 120 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Amitkumar
Top achievements
Rank 1
Amitkumar asked on 02 Jul 2012, 01:40 PM

Hi

How can I find Control inside data template? I want to find Textbox inside data template in data form when my text is changed.

My code is below.

<telerik:RadDataForm   Width="600" Grid.Row="1" VerticalAlignment="Top"
                                x:Name="myRadDataForm"
                                Header="Data"
                                                    
                                                    
                                ItemsSource="{Binding Product }"                                       
                                          AutoGenerateFields="False"
                           ReadOnlyTemplate="{StaticResource MyTemplate}"
                           EditTemplate="{StaticResource MyTemplate}"
                           NewItemTemplate="{StaticResource MyTemplate}">
                            </telerik:RadDataForm>
 
 
<Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition></RowDefinition>
 
                            </Grid.RowDefinitions>
 
                            <Grid.Resources>
 
                                <DataTemplate x:Key="MyTemplate">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition></ColumnDefinition>
                                            <ColumnDefinition></ColumnDefinition>
                                            <ColumnDefinition></ColumnDefinition>
 
                                        </Grid.ColumnDefinitions>
 
 
 
                                        <TextBlock Text="Barcode" Grid.Row="0" Grid.Column="0" >
                                        </TextBlock>
                                        <syncControls:AutoCompleteBox  x:Name="autBarcode"  Text="{Binding Barcode, Mode=TwoWay}" Grid.Row="0" Grid.Column="1">
                                        </syncControls:AutoCompleteBox>
 
                                        <TextBlock Text="UOM" Grid.Row="1" Grid.Column="0"   />
                                        <TextBox   x:Name="txtUOMDescription"  Text="{Binding UOMDescription, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" />
 
                                    </Grid>
                                </DataTemplate>
                            </Grid.Resources>

How can i achieve using MVVM.

Tags
DataForm
Asked by
Amitkumar
Top achievements
Rank 1
Share this question
or