|
-
May 31st, 2013, 03:10 AM
#2
Re: How to display multiple column ComboBox in DataGrid?
Hello,
I am able to achieve the requirement. However it still needs some improvement.
I have modified RadComboBox ControlTemplate and replace ScrollViewer and ItemsPresenter with
below RadGridView. It's working fine however I want following improvement
1. In-case there are multiple ComboBoxes I have to create ControlTemplate for each since
each ComboBox may have different ItemsSource, No. of columns, DisplayMembers and
SelectedValues.
2. When first time ComboBox display it don't have value selected eventhough it is there in
ItemsSource of GridView. Once I select an item from Combo next time onward it displays the
value.
<telerik:RadGridView x:Name="RadGridView99"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
ItemsSource="{TemplateBinding ItemsSource}"
AutoGenerateColumns="False"
IsReadOnly="True"
SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent},
Path=SelectedItem}"
ShowGroupPanel="False"
CanUserFreezeColumns="False"
RowIndicatorVisibility="Collapsed"
IsFilteringAllowed="False"
SelectionMode="Single"
telerik:StyleManager.Theme="Office_Blue"
Width="Auto"
Height="Auto">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Code"
DataMemberBinding="{Binding CurrencyISOCode}" />
<telerik:GridViewDataColumn Header="Name"
DataMemberBinding="{Binding CurrencyName}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Any help will be highly appreciated.
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|