比如 1)一个列表有60列,中间的可能10列可以编辑,不能编辑的列有锁住。
2)每10个列一种背景色
3)有部分列数据绑定后要循环赋值如下代码
string[] strMoneyText;
strMoneyText = new String[] { "RMB", "USD", "EUR", "HKD" };
string[] strMoneyValue;
strMoneyValue = new String[] { "RMB", "USD", "EUR", "HKD" };
FarPoint.Web.Spread.ButtonCellType btn = null;
FarPoint.Web.Spread.ButtonCellType btn = null;
for (int i = 0; i < FpSpreadGV.Rows.Count; i++)
{
//链接按钮,根据后台的数据赋值给每一个按钮
btn = new FarPoint.Web.Spread.ButtonCellType("btnLinkFile");
btn.ButtonType = FarPoint.Web.Spread.ButtonType.LinkButton;
if (!string.IsNullOrEmpty(FpSpreadGV.ActiveSheetView.Cells[i, 25].Text.Trim()) && Convert.ToInt32(FpSpreadGV.ActiveSheetView.Cells[i, 25].Text.Trim()) > 0)
{
btn.Text ="查看("+ FpSpreadGV.ActiveSheetView.Cells[i, 25].Text.Trim()+")";
btn.OnClientClick = "return OpenUploadFileWin('" + FpSpreadGV.ActiveSheetView.Cells[i, 27].Text.Trim() + "');";
}
this.FpSpreadGV.ActiveSheetView.Cells[i, 25].CellType = btn;
//根据后台的赋值选中下拉框
cbMoney = new FarPoint.Web.Spread.ComboBoxCellType(strMoneyText, strMoneyValue);
cbMoney.ShowButton = true;
FpSpreadGV.ActiveSheetView.Columns[16].CellType = cbMoney;
cbMoney.Values[0] = FpSpreadGV.ActiveSheetView.Cells[0, 16].Text;
}
以上3个条件下,只要加载200条数据左右就很慢(大概10秒左右显示出来),增加分页了也效果不大,有什么办法可以提高效率。 |
|