how to show RadGridView in ComboBox DataTemplate

3 posts, 0 answers
  1. Chetan
    Chetan avatar
    21 posts
    Member since:
    Nov 2010

    Posted 22 Nov 2010 Link to this post

    Hi,

    Is it possible to show RadGridView control in ComboBox DataTemplate ?

    my requirement is , on selecting combo box i need to show comboBox content in such a way that user can short , can search the records. i think RadGridView having all these functionality. currently i am showing TextBlock. Please check my code and let me know where i need to do changes.

    DataTemplate for combobox

     

     

    <DataTemplate x:Key="FeatureComboBoxCustomTemplate" >

     

     

     

    <Grid>

     

     

     

    <Grid.ColumnDefinitions>

     

     

     

    <ColumnDefinition Width="50" />

     

     

     

    <ColumnDefinition Width="350" />

     

     

     

    <ColumnDefinition Width="150" />

     

     

     

    </Grid.ColumnDefinitions>

     

     

     

    <Border >

     

     

     

    <TextBlock Text="{Binding FeatureNumber}"

     

     

    HorizontalAlignment="Left" />

     

     

     

    </Border>

     

     

     

    <Border Grid.Column="1" >

     

     

     

    <TextBlock Text="{Binding FeatureName}" HorizontalAlignment="Left" Margin="6,0,0,0" />

     

     

     

    </Border>

     

     

     

    <Border Grid.Column="2" >

     

     

     

    <TextBlock Text="{Binding UseCaseName}" HorizontalAlignment="Left" Margin="6,0,0,0" />

     

     

     

    </Border>

     

     

     

     

    </Grid>

     

     

     

    </DataTemplate>

     




    Combo BOx

     

     

    <!--Feature Name-->

     

     

     

    <telerik:GridViewComboBoxColumn

     

     

    UniqueName="Feature Name"

     

     

    SelectedValueMemberPath="FeatureID"

     

     

    DisplayMemberPath="FeatureName" IsResizable="False"

     

     

    DataMemberBinding="{Binding FeatureID,Mode=TwoWay}"

     

     

    ItemTemplate="{StaticResource FeatureComboBoxCustomTemplate}"

     

     

    Width="180"

     

     

    IsReadOnlyBinding="{Binding Path=., Converter={StaticResource GridRowReadOnlyConvertor}}">

     

     

     

    <telerik:GridViewComboBoxColumn.Header>

     

     

     

    <StackPanel>

     

     

     

    <TextBlock Text="Feature Name" VerticalAlignment="Center" TextWrapping="Wrap" />

     

     

     

    <TextBlock Text="*" Foreground="Red" />

     

     

     

    </StackPanel>

     

     

     

    </telerik:GridViewComboBoxColumn.Header>

     

     

     

    </telerik:GridViewComboBoxColumn>


    thanks

     

  2. George
    Admin
    George avatar
    1332 posts

    Posted 24 Nov 2010 Link to this post

    Hi Chetan,

    Please, refer to the following link - http://blogs.telerik.com/vladimirenchev/posts/10-04-09/how_to_filter_as_you_type_radgridview_inside_radcombobox_for_wpf_and_silverlight.aspx

    Regards,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Chetan
    Chetan avatar
    21 posts
    Member since:
    Nov 2010

    Posted 25 Nov 2010 Link to this post

    hi George ,

    i need to show RadGridview inside Gridcomboboxcolumn. is it possible?

    The link which u have sent not solving my problem bez here radgridview is inside radcombobox. problem is if i use radcombobox inside gridviewcolumn>cell template then i am not able to access combobox control in code behind on Rowloaded , RowEdited, addnewitem events.

    pls help me to solve any one so i can do same in my project. Its very urgent.

    thnks
    Csingh
Back to Top