Hello,
Currently I am trying to set the ItemsSource of a ComboBoxColumn that is in a grid in my RowDetails for a higher level Grid. I would a child table but I currently have other controls in the RowDetails I am binding to plus I don't really think that will fix my problem.
In the code block above, I tried binding the ItemsSource in the Xaml file to a property that returns a List<T> of what I want to bind to but the combo box shows no options to select which makes me believe that nothing was being loaded into the ItemsSource even though the debugger shows that the property is being accessed. I have also tried to find a way to access the comboboxcolumn in code but I cannot figure out how to access the controls in the RowDetails. If I did something wrong in my binding or if there is someway I could set the ItemsSource, even manually in either Xaml or code, for the ComboBoxColumn in a Grid in my RowDetails, then that would be most helpful.
Alex Mitchell
Currently I am trying to set the ItemsSource of a ComboBoxColumn that is in a grid in my RowDetails for a higher level Grid. I would a child table but I currently have other controls in the RowDetails I am binding to plus I don't really think that will fix my problem.
<telerik:RadGridView.RowDetailsTemplate> |
<DataTemplate> |
<Grid> |
<TextBlock Margin="125,8,0,0" Text="Rate" TextWrapping="Wrap" TextAlignment="Center" Height="17.001" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70" /> |
<telerik:RadMaskedTextBox HorizontalContentAlignment="Right" Mask="P" MaskType="Numeric" Margin="127.007,25.001,406,0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="19.96" Width="67.993" /> |
<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding Path=Payments, Mode=TwoWay}" Margin="8,53,8,8" ShowGroupPanel="False" AreRowDetailsFrozen="True" > |
<telerik:RadGridView.Columns> |
<telerik:GridViewComboBoxColumn ItemsSource="{Binding Path=AllTypes}" DisplayMemberPath="Type" DataMemberBinding="{Binding Path=TypeOfPayment}"/> |
<telerik:GridViewDataColumn Header="Event" DataMemberBinding="{Binding Path=TypeOfPayment.Type, Mode=TwoWay}" /> |
<telerik:GridViewDataColumn Header="Amount" TextAlignment="Right" DataMemberBinding="{Binding Path=Amount, Mode=TwoWay}" DataFormatString="{}{0:c}" /> |
<telerik:GridViewDataColumn Header="Number" TextAlignment="Right" DataMemberBinding="{Binding Path=Term, Mode=TwoWay}" /> |
<telerik:GridViewDataColumn Header="Period" TextAlignment="Right" DataMemberBinding="{Binding Path=Period, Mode=TwoWay}" /> |
<telerik:GridViewDataColumn Header="Notes" TextAlignment="Right" DataMemberBinding="{Binding Path=Notes, Mode=TwoWay}" /> |
</telerik:RadGridView.Columns> |
<Navigation:RadContextMenu.ContextMenu> |
<Navigation:RadContextMenu Opened="RadContextMenu_Opened" ItemClick="RadContextMenu_ItemClick"> |
<Navigation:RadContextMenu.Items> |
<Navigation:RadMenuItem Header="Add" /> |
<Navigation:RadMenuItem Header="Delete" /> |
</Navigation:RadContextMenu.Items> |
</Navigation:RadContextMenu> |
</Navigation:RadContextMenu.ContextMenu> |
</telerik:RadGridView> |
<Button Style="{DynamicResource RoundButton}" Click="btnClick" Foreground="{DynamicResource CalculateIcon}" Height="39" HorizontalAlignment="Right" Margin="0,8,8,0" Name="btnGenerate" VerticalAlignment="Top" Width="44">Button</Button> |
</Grid> |
</DataTemplate> |
</telerik:RadGridView.RowDetailsTemplate> |
In the code block above, I tried binding the ItemsSource in the Xaml file to a property that returns a List<T> of what I want to bind to but the combo box shows no options to select which makes me believe that nothing was being loaded into the ItemsSource even though the debugger shows that the property is being accessed. I have also tried to find a way to access the comboboxcolumn in code but I cannot figure out how to access the controls in the RowDetails. If I did something wrong in my binding or if there is someway I could set the ItemsSource, even manually in either Xaml or code, for the ComboBoxColumn in a Grid in my RowDetails, then that would be most helpful.
Alex Mitchell