selections of RadComboBox in GridViewDataColumn don't display.

1 Answer 205 Views
ComboBox GridView
JIJIKO
Top achievements
Rank 1
Iron
JIJIKO asked on 02 Nov 2021, 10:17 AM

I put a RadComboBox in GridViewDataColumn, but the selections in combobox don't display When i edit the cell.

But if i use RadComboBox separatly, it works.

Here is my code:

<telerik:GridViewDataColumn Header="AlertLocation" DataMemberBinding="{Binding AlertLocationName}">
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <telerik:RadComboBox ItemsSource="{Binding AlertLocations}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding AlertLocationName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 04 Nov 2021, 01:58 PM

Hello JIJIKO,

Without knowing your models and RadGridView setup, I will guess that if you remove the SelectedValuePath setting, the value will update properly. I also attached a small example showing how to setup a RadComboBox in a GridViewDataColumn. I hope that  helps.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ComboBox GridView
Asked by
JIJIKO
Top achievements
Rank 1
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or