1. In the nearest FlyGrid.Net update DropDownColumn will contain DropDownListOnCellClick property (default value = false) that will allow you to automatically dropdown list when user click on the cell of this column.
2. You can use followin DropdownListColumn inheritor that automatically drop downs list (when DropDownListOnCellClick property is true) and hides dropdown button when value is selected and stored in the edited cell:
[c#]
public class AutoDropDownListColumn : DropDownListColumn
{
public AutoDropDownListColumn() : base()
{
}
public AutoDropDownListColumn(string name) : base(name)
{
}
public AutoDropDownListColumn(string name, string fieldName) : base(name, fieldName)
{
}
private bool dropDownListOnCellClick = false;
[DefaultValue(false)]
public virtual bool DropDownListOnCellClick
{
get {return dropDownListOnCellClick;}
set
{
dropDownListOnCellClick = value;
}
}
public override bool OnCellClick(FlyGrid grid, NodeBase node, Point clickPt)
{
if (grid != null && DropDownListOnCellClick)
{
IDropDownService dds = (grid as IServiceProvider).GetService(typeof(IDropDownService)) as IDropDownService;
if (dds != null)
{
object[] values = GetValueList(node);
if (values != null && values.Length > 0)
{
object currentValue = base.GetValue(node);
dds.DropDownValuesList(currentValue, this, values);
grid.ActivePort.EndEdit(true);
return true;
}
}
}
return false;
}
}