This is a migrated thread and some comments may be shown as answers.

how to show RadGridView in ComboBox DataTemplate

2 Answers 91 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chetan
Top achievements
Rank 1
Chetan asked on 23 Nov 2010, 05:11 AM
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 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 24 Nov 2010, 04:57 PM
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
0
Chetan
Top achievements
Rank 1
answered on 25 Nov 2010, 05:17 PM
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
Tags
ComboBox
Asked by
Chetan
Top achievements
Rank 1
Answers by
George
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or