Hello -
I am nesting a RadComboBoxElement under a GridCellElement (in my actual code, I'm nesting a larger element tree of which one of the elements happens to be a combo box, which is why I cannot use a GridViewComboBoxColumn). I've almost achieved the desired behavior. Here are the three remaining issues:
1) Why doesn't clicking on the combo box's arrow button cause the dropdown to open up? Is the grid somehow intercepting this event?
3) When the Tab key is pressed, the current grid cell gets updated, but the keyboard focus is not moved from one combo box to the next. Can you tell me how to make tab work properly?
2) Why doesn't clicking into the combo box's RadTextBoxElement cause the current grid row to be adjusted (note that clicking on the arrow button does adjust the current grid row)? I believe the answer may be that the textbox is intercepting the mouse click even though I set RadComboBoxElement.NotifyParentOnMouseInput to true. What is the suggested workaround?
Here is some simple code that reproduces the problem:
void grid_CellFormatting(object sender, CellFormattingEventArgs e) |
{ |
if (e.CellElement.Children.Count == 0) |
{ |
var element = new RadComboBoxElement(); |
element.NotifyParentOnMouseInput = true; |
element.DataSource = new List<string>() { "First", "Second", "Third" }; |
e.CellElement.Children.Add(element); |
} |
} |
void Form1_Load(object sender, EventArgs e) |
{ |
var grid = new RadGridView(); |
Controls.Add(grid); |
grid.BeginInit(); |
grid.EndInit(); |
grid.CellFormatting += new CellFormattingEventHandler(grid_CellFormatting); |
grid.MasterGridViewTemplate.AutoGenerateColumns = false; |
grid.Columns.Add(new GridViewDataColumn() { HeaderText = "Header" }); |
grid.DataSource = new List<int> { 1, 2, 3 }; |
} |
Thanks,
- Mike