RadComboBox inside Datagrid

3 posts, 0 answers
  1. Disha
    Disha avatar
    3 posts
    Member since:
    Apr 2008

    Posted 04 Nov 2008 Link to this post

    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. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 11 Nov 2008 Link to this post

    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.
  3. smith
    smith avatar
    54 posts
    Member since:
    Mar 2009

    Posted 03 Nov 2009 Link to this post

    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.


Back to Top