I have a RadGridView that is using a GridViewDataColumn, CellTemplate, and some DataTemplates to display an appropriate editor based on the type of data in the current row. I also have a GridViewComboBoxColumn on the same row.
My first question is if it's possible to change the combobox to behave more like a "vanilla" WPF combobox - always displaying the selection arrow and requiring only a single click to edit the contents?
My second question is I how I cause the combobox to accept it's current value when the user clicks in the GridViewDataColumn. If it's a standard GridViewDataColumn the behavior is what I would expect (clicking in the cell will change the underlying data for the combobox) but if I use a CellTemplate to display a different editor that behavior is lost.
EDIT: The sort of behavior I'm trying to mimic is best described with the classes below. Imagine having an ObservableCollection<Player> that you wanted to display in a GridView. For Pitchers you want to show an editor for the RunAverage, for Batters you want to show BattingAverage, and for regular Players you want to show the Salary.
public class Player
{
public string Name {get;set;}
public int JersyNumber {get;set;}
public Currency Salary {get;set;}
}
public class Pitcher : Player
{
public decimal RunAverage {get;set;}
}
public class Batter : Player
{
public decimal BattingAverage{get;set;}
}
My first question is if it's possible to change the combobox to behave more like a "vanilla" WPF combobox - always displaying the selection arrow and requiring only a single click to edit the contents?
My second question is I how I cause the combobox to accept it's current value when the user clicks in the GridViewDataColumn. If it's a standard GridViewDataColumn the behavior is what I would expect (clicking in the cell will change the underlying data for the combobox) but if I use a CellTemplate to display a different editor that behavior is lost.
EDIT: The sort of behavior I'm trying to mimic is best described with the classes below. Imagine having an ObservableCollection<Player> that you wanted to display in a GridView. For Pitchers you want to show an editor for the RunAverage, for Batters you want to show BattingAverage, and for regular Players you want to show the Salary.
public class Player
{
public string Name {get;set;}
public int JersyNumber {get;set;}
public Currency Salary {get;set;}
}
public class Pitcher : Player
{
public decimal RunAverage {get;set;}
}
public class Batter : Player
{
public decimal BattingAverage{get;set;}
}