Hi i have a grid containg a combobox column,i had a few research for databinding in a template,but i can see databounded objects in my column ,whats wrong
Gridview is databound manually in runtime from EntityFramework,i cant see data aboute row groups in gridview column
//Gridview
<telerik:GridViewColumn CellTemplate="{DynamicResource Cell_RouteGroup}" Header="Group" Width="180" DataContext="{Binding RouteGroupDataSource}"></telerik:GridViewDataColumn>
//Template
<UserControl.Resources>
<DataTemplate x:Key="Cell_RouteGroup">
<telerik:RadComboBox Height="29" Width="118" Foreground="Black" DisplayMemberPath="GroupName" SelectedValuePath="RouteGroupID" ItemSource={Binding RouteGroupSource} SelectedValue="{Binding RouteGroupID}" />
</DataTemplate>
</UserControl.Resources>
//C#
public IOrderedQueryable<Routes_Groups> RouteGroupDataSource
{
get { return Loader.TEX.Routes_Groups.OrderBy(p => p.GroupName); }
}
Gridview is databound manually in runtime from EntityFramework,i cant see data aboute row groups in gridview column
//Gridview
<telerik:GridViewColumn CellTemplate="{DynamicResource Cell_RouteGroup}" Header="Group" Width="180" DataContext="{Binding RouteGroupDataSource}"></telerik:GridViewDataColumn>
//Template
<UserControl.Resources>
<DataTemplate x:Key="Cell_RouteGroup">
<telerik:RadComboBox Height="29" Width="118" Foreground="Black" DisplayMemberPath="GroupName" SelectedValuePath="RouteGroupID" ItemSource={Binding RouteGroupSource} SelectedValue="{Binding RouteGroupID}" />
</DataTemplate>
</UserControl.Resources>
//C#
public IOrderedQueryable<Routes_Groups> RouteGroupDataSource
{
get { return Loader.TEX.Routes_Groups.OrderBy(p => p.GroupName); }
}