本帖最后由 sxtywp2 于 2017-2-10 08:38 编辑
一、在列表中的行变动的时候,取取到新行的关键字段,然后带关键字段值转到明细表页面
二、还有个问题请教
Binding to a Range是指区域绑定吧,手册代码中
System.Data.DataTable dt = new System.Data.DataTable("Test");
System.Data.DataRow dr = default(System.Data.DataRow);
dt.Columns.Add("Series0");
dt.Columns.Add("Series1");
dt.Columns.Add("Series2");
dr = dt.NewRow();
dr[0] = 2;
dr[1] = 1;
dr[2] = 5;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 4;
dr[1] = 2;
dr[2] = 5;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 3;
dr[1] = 4;
dr[2] = 5;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 3;
dr[1] = 4;
dr[2] = 5;
FpSpread1.DataSource = dt;
FarPoint.Web.Spread.SpreadDataSource spreadDS = new FarPoint.Web.Spread.SpreadDataSource();
spreadDS.SheetName = FpSpread1.ActiveSheetView.SheetName;
spreadDS.SpreadID = "FpSpread1";//FpSpread1.ID;
spreadDS.CellRange = new FarPoint.Web.Spread.Model.CellRange(0, 0, 3, 1);
this.Controls.Add(spreadDS);
this.ListBox1.DataSource = spreadDS;
this.ListBox1.DataTextField = "Series0";
this.ListBox1.DataBind();
其中的ListBox1与FpSpread1看不明白
三、表格第五行有个计算:A5=C5+E5+G5+I5
当第7、第9等等许多行满足这类似条件,想写个循环
其中核心语句:
FpSpread1.Sheets[0].Cells[m+2, 0].Formula = "C(m+2)+E(m+2)+G(m+2)+I(m+2)";
或A(m+2)=C(m+2)+E(m+2)+G(m+2)+I(m+2)或其他
不知道怎么写,请教,谢谢!
|