farpoint spread问题,求大神来,又追加分!!!

你好, 可以利用 Spread 的 CellClick 事件和 CellDoubleClick事件实现上述两个功能。

1. CellClick 事件实现点击第二列单元格,单元格进入编辑状态:

private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)

{

int row = e.Row;

int col = e.Column;

if (!e.ColumnHeader)

{

if (!e.ColumnFooter)

{

if (e.Column == 1)

{

e.Cancel = true;

e.View.GetSheetView().SetActiveCell(row,col);

e.View.EditMode=true;

}

}

}

}

2.CellDoubleClick 事件实现双击第二列单元格,获取单元格文本:

private void fpSpread1_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)

{

int row = e.Row;

int col = e.Column;

string cellText = "";

if (!e.ColumnHeader)

{

if (!e.ColumnFooter)

{

if (e.Column == 1)

{

cellText = this.fpSpread1.ActiveSheet.Cells[row, col].Text;

}

}

}

}

3.顺便提醒下,Spread 有专门的技术支持论坛,可以百度-葡萄城产品技术社区,相信你在那里可以得到专业快速的解答,希望我的回答对你有帮助~