Cannot access the Control

1 posts, 0 answers
  1. Vuyiswa Maseko
    Vuyiswa Maseko avatar
    187 posts
    Member since:
    Jan 2010

    Posted 18 Jun 2011 Link to this post

    I have a coverflow defined like this

     
    <telerik:RadCoverFlow x:Name="cover" SelectionChanged="cover_SelectionChanged" ReflectionHeight="0.2">
                    <telerik:RadCoverFlow.ItemTemplate>
                        <DataTemplate>
                            <Grid telerik:RadCoverFlow.EnableLoadNotification="True"  Width="150" Height="Auto">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                              
                                <StackPanel>
                                    <TextBlock Text="{Binding sSchoolName}" Grid.Row="0" Grid.Column="1" />
                                    <Image Source="{Binding sPhoto, Converter={StaticResource FormatConverter}}" />
                                    <TextBox x:Name="txtamount"  TextChanged="txtamount_TextChanged"    BorderBrush="Black" />
                                    <Button x:Name="btnPaynow" Click="btnPaynow_Click" Content="PayNow" />
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </telerik:RadCoverFlow.ItemTemplate>
                </telerik:RadCoverFlow>

    as you can see there is a textbox named "txtamount" , i am trying to access this textbox value in C#, it seams like the textbox is not available or visible

    string Amount = txtamount.Text;


    Thanks
Back to Top