Silverlight 里怎样获取DataGrid中 RowDetailsTemplate 中的控件值?
比如:
- C# code
<sdk:DataGrid.RowDetailsTemplate> <DataTemplate> <StackPanel x:Name="stackReason" Height="50" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> <TextBlock x:Name="tbR1" Text="展示信息:" VerticalAlignment="Center"></TextBlock> <TextBlock x:Name="UpId" Visibility="Collapsed" DataContext="{Binding ReasonID}"></TextBlock> <TextBox x:Name="txtReasonContent" Text="{Binding ReasonContent}" Width="300" Height="50"></TextBox> <Button x:Name="btnUpdate" Content="保存" Width="50" Click="btnUpdate_Click"></Button> </StackPanel> </DataTemplate></sdk:DataGrid.RowDetailsTemplate>
怎样获取UpId中的值?