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

RadComboBox inside Datagrid

2 Answers 160 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Disha
Top achievements
Rank 1
Disha asked on 04 Nov 2008, 12:11 PM

Hello,

 I have a RadComboBox inside datagrid. I am binding my datagrid from a collection, which I get from WCF Service Call.

For eg. My collection name is Product. and it has members
 ProductId, ProductName and CategoryCollection.

CategoryCollection has members: Category Id, Category Name.

In My datagrid I need to display, ProductName and dropdown for CategoryCollection.

When i bind my categorycollection to listbox it works fine. My code is :
  <my:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <ListBox x:Name="lstName"  Height="30" Width="200" Grid.Column="1" ItemsSource="{Binding CategoryCollection}"  DisplayMemberPath="categoryname" ScrollViewer.VerticalScrollBarVisibility="Visible"   SelectionChanged="lstName_SelectionChanged"  ></ListBox>
                                       
                                    </Grid>
                                </DataTemplate>
  </my:DataGridTemplateColumn.CellTemplate>

But when I use RadComboBox, records doesn't show up, just an empty combo box thats all I get. my Code for RadComboBox

 <my:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Grid>

                                        <telerik:RadComboBox x:Name="ddN" ItemsSource="{Binding CategoryCollection}" DisplayMemberPath="categoryname" Height="20" Grid.Column="2" MinWidth="40" ></telerik:RadComboBox>
                                       
                                       
                                    </Grid>
                                </DataTemplate>
                            </my:DataGridTemplateColumn.CellTemplate>

Please suggest?

 

 

 

2 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 11 Nov 2008, 09:48 AM

Hi Disha,

Sorry for the late response. We were busy preparing for the Q3 release.

I have tested your scenario with our latest Q3 release and RadComboBox is working correctly. The problem was the you set DisplayMemberPath to "categoryname" instead of "CategoryName". DisplayMemberPath is case sensitive. Set it to CategoryName and it will work.

If you have any other questions, I'll glad to help.


Greetings,

Hristo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
smith
Top achievements
Rank 1
answered on 03 Nov 2009, 09:53 AM
HI

 I  have one combobox  in this combobox i need to bind the Grid, Grid Contains one colum have the Image;

if i select the row in gridView have to display the image and selected row in Combox Selected iTem , I got one example in Telerik
with out image it is working fine
1. if i have the image how to bind in gRid view inside combox.


Tags
ComboBox
Asked by
Disha
Top achievements
Rank 1
Answers by
Hristo
Telerik team
smith
Top achievements
Rank 1
Share this question
or