This question is locked. New answers and comments are not allowed.
Hi,
I am having no luck using a RadGridView inside the ItemTemplate of a RadComboBox. The issue seems to be the binding of the ItemSource of the RadGridView. If I use a "regular" grid, as below, the binding works fine.
Given this class definition:
public class LandManagement {
public string ManagementName { get; set; }
public string ManagementSystemType {get; set;}
public double AreaCovered { get; set;}
}
And an Observable collection of LandManagements - "ManagementChoices", This works like a champ.
However, when I replace the "regular" grid with the RadGridView, it is clear that the binding has failed. Does anyone have an example of using a RadGridView in the combo box popup or see anything wrong/incomplete with my xaml.
This does not work - I see only the values "ManagementName","ManagementSystemType", etc. for each row in the popup grid. Clearly the binding is broken/incorrrect in the RadGridView:
Thanks a lot
Charlie
I am having no luck using a RadGridView inside the ItemTemplate of a RadComboBox. The issue seems to be the binding of the ItemSource of the RadGridView. If I use a "regular" grid, as below, the binding works fine.
Given this class definition:
public class LandManagement {
public string ManagementName { get; set; }
public string ManagementSystemType {get; set;}
public double AreaCovered { get; set;}
}
And an Observable collection of LandManagements - "ManagementChoices", This works like a champ.
| <telerikComboBox:RadComboBox x:Name="LUBTMgmtComboBox" |
| ItemsSource="{Binding ManagementChoices}" |
| telerik:TextSearch.TextPath="ManagementName" |
| Style="{StaticResource ComboStyle}" |
| SelectionBoxItemTemplate="{StaticResource RadComboSelectedItem}"> |
| <telerikComboBox:RadComboBox.ItemTemplate> |
| <DataTemplate> |
| <Grid> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="2*"/> |
| <ColumnDefinition Width="Auto"/> |
| <ColumnDefinition/> |
| </Grid.ColumnDefinitions> |
| <TextBlock Grid.Column="0" Text="{Binding ManagementName}"/> |
| <Border Background="AliceBlue" Grid.Column="1"> |
| <TextBlock Padding="3 0 0 2" Grid.Column="1" Text="{Binding ManagementSystemType}"/> |
| </Border> |
| <TextBlock Grid.Column="2" Padding="4 0 0 2" |
| Text="{Binding AreaCovered, Converter={StaticResource standAreaConverter}}"/> |
| </Grid> |
| </DataTemplate> |
| </telerikComboBox:RadComboBox.ItemTemplate> |
| </telerikComboBox:RadComboBox> |
However, when I replace the "regular" grid with the RadGridView, it is clear that the binding has failed. Does anyone have an example of using a RadGridView in the combo box popup or see anything wrong/incomplete with my xaml.
This does not work - I see only the values "ManagementName","ManagementSystemType", etc. for each row in the popup grid. Clearly the binding is broken/incorrrect in the RadGridView:
| <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2> |
| <telerikComboBox:RadComboBox x:Name="LUBTMgmtComboBox" |
| ItemsSource="{Binding ManagementChoices}" |
| telerik:TextSearch.TextPath="ManagementName" |
| Style="{StaticResource ComboStyle}" |
| SelectionBoxItemTemplate="{StaticResource RadComboSelectedItem}"> |
| <telerikComboBox:RadComboBox.ItemTemplate> |
| <DataTemplate> |
| <telerikGrid:RadGridView x:Name="LUBTMgmtGridView" |
| AutoGenerateColumns="False" |
| ShowGroupPanel="False"> |
| <telerikGrid:RadGridView.Columns> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding ManagementName}" Header="Management"/> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding ManagementSystemType}" Header="Mgmt Type"/> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding AreaCovered, Converter={StaticResource AreaConverter}}" Header="Area Covered" IsGroupable="False"/> |
| </telerikGrid:RadGridView.Columns> |
| </telerikGrid:RadGridView> |
| </DataTemplate> |
| </telerikComboBox:RadComboBox.ItemTemplate> |
| </telerikComboBox:RadComboBox> |
Thanks a lot
Charlie
