Finding control inside of gridview row.

2 posts, 0 answers
  1. Amit Patel
    Amit Patel avatar
    71 posts
    Member since:
    Sep 2009

    Posted 20 Oct 2009 Link to this post

    I have xaml code setup for grid view and have combo box in it. I would like to get the reference of combo box during runtime when user clicks on the row. I have the OnGridViewRowSelection event setup. I have already tried FindName methods on cell, row and grid to find the combo box, but on each case I am keep on getting null reference for comboBox..

     

     

    <telerik:RadGridView.Columns>

     

     

     

    <telerik:GridViewDataColumn HeaderTextAlignment="Center" Width="200" Header="Name" DataMemberPath="Name" IsFilterable="False"/>

     

     

     

     IsFilterable="False"/>

     

     

     

    <telerik:GridViewDataColumn Header="Amit" UniqueName="Amit">

     

     

     

    <telerik:GridViewDataColumn.CellTemplate>

     

     

     

    <DataTemplate>

     

     

     

    <ComboBox Name="_comboBoxAttributeValue" Loaded="OnComboBoxAttributeValueLoaded">

     

     

     

    <ComboBox.ItemTemplate>

     

     

     

    <DataTemplate>

     

     

     

    <CheckBox Content="{Binding Path=Name}" Click="CheckBox_Click" />

     

     

     

    </DataTemplate>

     

     

     

    </ComboBox.ItemTemplate>

     

     

     

    </ComboBox>

     

     

     

    </DataTemplate>

     

     

     

    </telerik:GridViewDataColumn.CellTemplate>

     

     

     

    </telerik:GridViewDataColumn>

     

     

     

    </telerik:RadGridView.Columns>

     

     

     

    </telerik:RadGridView>

     

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Oct 2009 Link to this post

    Hello,

    Please check my answer in your other thread here.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top