您好,
解决的思路是,自定义EditModeOn事件。
判断是否为ComboBoxCellType,然后让选中全部文字,可以参考以下代码:- void fpSpread1_EditModeOn(object sender, EventArgs e)
- {
- if (fpSpread1.ActiveSheet.ActiveCell != null && ((fpSpread1.ActiveSheet.ActiveCell.CellType) is FarPoint.Win.Spread.CellType.ComboBoxCellType || (fpSpread1.ActiveSheet.ActiveColumn.CellType) is FarPoint.Win.Spread.CellType.ComboBoxCellType))
- {
- FarPoint.Win.FpCombo ctl = fpSpread1.EditingControl as FarPoint.Win.FpCombo;
- ctl.SelectAll();
- ctl.Select(0, 1);
- }
- }
复制代码
希望能够帮助到您。 |