Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to find the Label control in silverlight Datagrid Dropdown SelectionChanged Event
    primarykey
    data
    text
    <p>I am using SiverLight Datagrid in side that one dropdownlist and label are there In the Dropdown SelectedIndexChanged Event I want to find the Label and Assign the Selected Value of DropdownList.</p> <p>Xaml Page : </p> <pre><code> &lt;sdk:DataGridTemplateColumn Header="New Receipe" CanUserSort="True" &gt; &lt;sdk:DataGridTemplateColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;Grid&gt; &lt;Border Style="{StaticResource GridBackgroundBorder}" Background="{Binding Path=IsActive, Converter={StaticResource BoolToBackgroundValueConverter1}}"&gt;&lt;/Border&gt; &lt;sdk:Label Margin="5,0,5,0" x:Name="lblCompVer" Content="{Binding Path=Version}" Height="Auto" VerticalAlignment="Center" Foreground="{Binding Path=IsActive, Converter={StaticResource BoolToForegroundValueConverter1}}"/&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/sdk:DataGridTemplateColumn.CellTemplate&gt; &lt;sdk:DataGridTemplateColumn.CellEditingTemplate&gt; &lt;DataTemplate&gt; &lt;Grid&gt; &lt;ComboBox Height="Auto" SelectionChanged="cboCompVerSel_SelectionChanged" x:Name="cboCompVerSel" ItemsSource="{Binding Path=CompVerList,Mode=TwoWay}" SelectedItem="{Binding Mode=OneWay, Path=Version}" Visibility="{Binding Path=IsActive, Converter={StaticResource BoolToVisibilityValueConverter1}}"/&gt; &lt;!--&lt;TextBox Height="Auto" Text="{Binding Mode=TwoWay, Path=Version}" x:Name="TextBoxCodeVer" Visibility="{Binding Path=IsActive, Converter={StaticResource BoolToVisibilityValueConverter1}}" AcceptsReturn="True"&gt;&lt;/TextBox&gt;--&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/sdk:DataGridTemplateColumn.CellEditingTemplate&gt; &lt;/sdk:DataGridTemplateColumn&gt; </code></pre> <p>DropDownlist SelectionChanged Event : </p> <pre><code> Private Sub cboCompVerSel_SelectionChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) Dim src = TryCast(sender, ComboBox) If src IsNot Nothing Then Dim fe As FrameworkElement = CType(src.Parent, FrameworkElement) Dim gridCmbo As Grid = DirectCast(fe, Grid) Dim lblCompVer As Label = CType(gridCmbo.FindName("lblCompVer"), Label) lblCompVer.DataContext = src.SelectedItem End If End Sub </code></pre> <p>I am not able to identify the lblCompVer control to assign the dropdown selected value</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload