回复 3楼noahark的帖子
RowMode 是以行为单位进行显示的,或者是我理解的“行选择”概念和你不同?
如果需要仅仅使第一列可选,需要锁定其他列:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.CheckBoxCellType ck = new FarPoint.Web.Spread.CheckBoxCellType();
- ck.Text = "True/False";
- ck.TextAlign = TextAlign.Left;
- SheetView sv = FpSpread1.ActiveSheetView;
- sv.Columns[0].CellType = ck;
- sv.OperationMode = FarPoint.Web.Spread.OperationMode.RowMode;
- int columnCount = sv.ColumnCount;
- for (int i = 1; i < columnCount; i++)
- {
- sv.Columns[i].Locked = true;
- }
- }
复制代码 |