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

Combobox is not populating in GridView

1 Answer 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
RAVINDRA
Top achievements
Rank 1
RAVINDRA asked on 04 May 2011, 09:18 AM
Hi

I am using combobox in GridView as shown in the below code. I have used Code Behind Properties to bind ItemsSource of the combobox. Even though, the code behind property is getting the list of values, but the combobox is not getting populated on UI. Please let me know what would be the mistake here. I am using EF4 and WCF Ria Services. The data I am displaying in the combo box comes from teh database and gets populated into the respective container in the domain context.
Also, if i place the same combobox outside the datagrid, the combobox is getting populated without any issue.

Please let me know what should be done here.

Thanks in advance
Ravindra 
<bases:BaseChildWindow xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                       x:Class="Dhh.Security.ChildWindows.AddNewUserChildWindow"
                       xmlns:bases="clr-namespace:Dhh.Security.Views.Bases"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                       xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
                       xmlns:windControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                       Width="Auto" Height="Auto"
                       Title="Add New User"
                      x:Name="childWindow">
    <Grid x:Name="LayoutRoot" DataContext="{Binding ElementName=childWindow, Path=NewUser}">
        <telerik:RadGridView ItemsSource="{Binding UserDomainAccounts}" AutoGenerateColumns="False" SelectedItem="{Binding  SelectedUserDomainAccount, ElementName=childWindow, Mode=TwoWay}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="DomainName" DataMemberBinding="{Binding DomainName, Mode=TwoWay}"/>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name, Mode=TwoWay}"/>
                <telerik:GridViewComboBoxColumn Header="Account Policy" ItemsSourceBinding="{Binding ElementName=childWindow, Path=Context.tblAccountPolicies}" DataMemberBinding="{Binding tblAccountPolicy, Mode=TwoWay}" DisplayMemberPath="Name"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</bases:BaseChildWindow>

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 04 May 2011, 09:21 AM
Hi Ravindra

 

You may use the following forum thread for further info.

Best wishes,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
RAVINDRA
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or