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

[Solved] GridViewComboBoxColumn problems

1 Answer 156 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Trude
Top achievements
Rank 2
Trude asked on 25 Nov 2009, 09:21 AM
The following grid have two columns. One where I use a template with a combobox; it displays the customer name, but the combobox is of course not bound to the grid (selected index not in sync). The ComboBoxColumn gives a parser error (and application crashes) and I can't figure out why? The ItemSource (ria domaindatasource defined in app.xaml) works on a normal combobox in the first column.

        <telerikGrid:RadGridView x:Name="RadGrid1" ItemsSource="{Binding Data, ElementName=datasource_radgrid1, Mode=TwoWay}">
            <telerikGrid:RadGridView.Columns>
                <telerikGrid:GridViewDataColumn Header="Customer1" DataMemberBinding="{Binding customer_name}">
                    <telerikGrid:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <ComboBox x:Name="ComboCustomer" ItemsSource="{Binding Data, Source={StaticResource customer_tab}}" DisplayMemberPath="name" MaxHeight="100" />
                        </DataTemplate>
                    </telerikGrid:GridViewDataColumn.CellEditTemplate>                    
                </telerikGrid:GridViewDataColumn>
                <telerikGrid:GridViewComboBoxColumn Header="Customer2" DataMemberBinding="{Binding customer_id}" ItemsSource="{Binding Data, Source={StaticResource customer_tab}}" DisplayMemberPath="name" SelectedValueMemberPath="id" />
            </telerikGrid:RadGridView.Columns>
        </telerikGrid:RadGridView>

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 30 Nov 2009, 02:47 PM
Hi Jorn,

Lately we have provided  some extended functionality to GridViewComboBox column to support scenarios like yours.

To see this in action please download and use the binaries form the latest internal build. It should be available for download in your Client.NET account.

You will need also to use the ItemsSourceBinding property of the GridViewComboBoxColumn, instead of the  ItemsSource property.

Regards,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Trude
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Share this question
or