Hello,
I was going over the documentation page for a combo box column in a RadGridView. The "one click" solution shows adding styles to the Column definition in XAML to set "OpenDropDownOnFocus" to true.
Is there a way this can be accomplished in code? I am using the NoXaml binaries. I tried the following:
var col =
new
GridViewComboBoxColumn { DataMemberBinding =
new
Binding(
"Lookup"
) };
col.ItemsSourceBinding =
new
Binding(
"Lookups"
);
col.EditorStyle =
new
Style(
typeof
(RadComboBox));
// Editor Style is null by default
col.EditorStyle.Setters.Add(
new
Setter {
Property = RadComboBox.OpenDropDownOnFocusProperty,
Value =
true
});
// Item template displays other properies in the "Lookup" object.
col.ItemTemplate = (DataTemplate)Application.Current.Resources[
"lookup"
];
But when the grid renders now, the dispaly works, but the editor for the combobox columns no longer have content.
Since I'm using the NoXaml binaries, do I need to explicitly define the EditorTemplate as well because the EditorStyle overrides the implicit template?