Hello,
I am having trouble with the GridViewMultiComboBoxColumn. I created a custom class inheriting from GridViewMultiComboBoxColumn but only to expose a method for my factory class. It is displaying the drop down correctly, however, once I've selected an item from the drop down, it does not reflect the selected value in the cell.
using
System;
using
ActivitySchedule.Factory;
namespace
Telerik.WinControls.UI
{
public
class
GridViewBoundObjectColumn : GridViewMultiComboBoxColumn
{
private
readonly
Type _type;
public
bool
_isColumnAdded;
public
GridViewBoundObjectColumn(Type t)
{
_type = t;
}
public
void
RadGridView_CellBeginEdit(
object
sender, GridViewCellCancelEventArgs e)
{
var radGridView = sender
as
GridViewEditManager;
if
(e.ColumnIndex ==
this
.Index)
{
if
(!_isColumnAdded)
{
_isColumnAdded =
true
;
RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)radGridView.ActiveEditor;
editor.EditorControl.MasterTemplate.AutoGenerateColumns =
false
;
editor.EditorControl.PopulateStructure(_type);
editor.AutoSizeDropDownToBestFit =
true
;
}
}
}
}
}
For testing I changed the GridViewMultiComboBoxColumn to a GridViewComboBoxColumn and set the DataSource, DisplayMember, and ValueMember the same way. It does reflect the selection in the cell but does not allow the user to see the extra fields when selecting from the drop down as with the GridViewMultiComboBoxColumn.
GridViewMultiComboBoxColumn.DataSource = BindingList<Foo>();
Any advice would be greatly appreciated. Banging my head on my desk at this point.