回复 1楼一萧一剑的帖子
1# 问题,我理解您的意思是绑定数据源后无法取到第二页数据的值,这样理解正确吗?
我通过以下代码并没有重现问题:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- DataTable dt = new DataTable();
- for (int i = 0; i < 13; i++)
- {
- dt.Columns.Add("col"+i.ToString());
- }
- for (int i = 0; i < 60; i++)
- {
- dt.Rows.Add(i.ToString(),i.ToString(),i.ToString(),"RMB",i.ToString(),i.ToString(),i.ToString(),i.ToString(),i.ToString(),i.ToString(),i.ToString(),i.ToString(),i.ToString());
- }
- FpSpreadGV.DataSource = dt;
- FpSpreadGV.DataBind();
- string[] strMoneyText;
- strMoneyText = new String[] { "RMB NO VAT", "USD", "EUR", "HKD" };
- string[] strMoneyValue;
- strMoneyValue = new String[] { "RMB", "USD", "EUR", "HKD" };
- FarPoint.Web.Spread.ComboBoxCellType cbMoney = new FarPoint.Web.Spread.ComboBoxCellType(strMoneyText, strMoneyValue);
- //显示下拉框
- cbMoney.ShowButton = true;
- FpSpreadGV.ActiveSheetView.Columns[3].CellType = cbMoney;
- this.FpSpreadGV.ActiveSheetView.PageSize = 50;
- this.Response.Write(this.FpSpreadGV.ActiveSheetView.Cells[52,3].Text);
- }
复制代码
3# 问题请问您是如何获取数据的?Spread 提供了 UpdateCommand 用于获取单元格中修改的数据。具体使用方法请参考:
http://blog.gcpowertools.com.cn/ ... et_usecommands.aspx
具体到您这里,需要通过前台按钮点击事件进行保存可以在前台通过以下代码调用 FpSpread1_UpdateCommand:
附件为 Demo(VS2013+SpreadV8.1+C#)
17603.zip
(7.88 KB, 下载次数: 569)
|