private Table GetTable(List<Model.Goods> list, Model.Goods g, List<int> parentids)
{
Table t = new Table();
t.CellPadding = 0;
t.CellSpacing = 0;
TableRow r = new TableRow();
//判断父节点
for (int i = 0; i < parentids.Count; i++)
{
TableCell c = new TableCell();
//
TableCell c1 = new TableCell();
System.Web.UI.WebControls.TextBox txt = new TextBox();
txt.Text = g.Name;
txt.Attributes.Add("onblur", string.Format("TxtClick(this.value)"));
c1.Controls.Add(txt);
r.Cells.Add(c1);
//
t.Rows.Add(r);
return t;
}
}
else if (e.CommandName == "TxtClickCommand")
{
string value = e.CommandArgument.ToString();
FpSpread1.SaveChanges();
List<Model.Goods> list = FpSpread1.ActiveSheetView.DataSource as List<Model.Goods>;
//
TreeCellType tree = new TreeCellType();
tree.list = list;
FpSpread1.ActiveSheetView.Columns[0].CellType = tree;
FpSpread1.ActiveSheetView.DataSource = null;
FpSpread1.ActiveSheetView.DataSource = list;
}