This question is locked. New answers and comments are not allowed.
Hi,
I have a GridView with a few GridViewComboBoxColumn(s). I can't get it to work so that when the gridview is bound, the Combobox column displays the correct value for that field from the drop down and also update the underlying item when I pick a new value. Here is a sequence of my code:
1. Here is a declaration of the column:
I have a GridView with a few GridViewComboBoxColumn(s). I can't get it to work so that when the gridview is bound, the Combobox column displays the correct value for that field from the drop down and also update the underlying item when I pick a new value. Here is a sequence of my code:
1. Here is a declaration of the column:
<
telerik:GridViewComboBoxColumn
UniqueName
=
"ThirdPartyNew"
Header
=
"Third Party New"
IsGroupable
=
"False"
Width
=
"120"
SelectedValueMemberPath
=
"ID"
DisplayMemberPath
=
"Name"
DataMemberBinding
=
"{Binding ThirdPartyID, Mode=TwoWay}"
IsFilterable
=
"False"
/>
2. Then in the 'OnNavigatedTo' event, I Bind my gridview to a collection of my business objects. One of these is the field that is represented by the above combobox column.
3. In the 'DataLoaded' event of the GridView, I bind the comboboxcolumn as follows:
deExtenderClient.GetAllThirdPartiesCompleted += (s2, ea2) =>
{
(rgvOrdersEdit.Columns["ThirdPartyNew"] as GridViewComboBoxColumn).ItemsSource = (List<
DEExtenderDataServiceRef.Agency
>)ea2.Result;
};
deExtenderClient.GetAllThirdPartiesAsync();
This however doesn't work. When I run the app, the column is empty to begin with. When I edit the column, I do see the combobox filled with items. But When I select and tab out, it doesn't display anything.
Pl help!
Thanks!