protected void btnAddItem_Click(object sender, EventArgs e)
{
int index = this.GetIndexVal();
//Ext.Net.FieldSet fieldSet = new Ext.Net.FieldSet
//{
// ID = "fieldSet" + index,
// Border = false
//};
HiddenField hf = new HiddenField
{
ID = "hidden" + index,
};
Ext.Net.Checkbox checkbox = new Ext.Net.Checkbox
{
ID = "checkbox" + index,
};
Ext.Net.FieldContainer fieldContainer = new Ext.Net.FieldContainer
{
ID = "fieldContainer" + index,
Layout = "HBoxLayout",
Border = false
};
Ext.Net.TextField itemField = new Ext.Net.TextField
{
ID = "itemField" + index,
FieldLabel = "项目",
LabelWidth = 50,
Text = "项目"
};
Ext.Net.TextField accountField = new Ext.Net.TextField
{
ID = "accountField" + index,
FieldLabel = "金额",
LabelWidth = 50,
Text = "金额"
};
fieldContainer.Items.Add(checkbox);
fieldContainer.Items.Add(itemField);
fieldContainer.Items.Add(accountField);
splitItemForm.AddTo(this.splitFieldSet);
//this.splitFieldSet.Items.Add(fieldContainer);
//fieldSet.Items.Add(fieldContainer);
//fieldSet.AddTo(this.splitFieldSet);
Panel1.Expand();
splitItemForm.Render();
}
private int GetIndexVal()
{
int idx = Convert.ToInt32(index) + 1;
index = idx.ToString();
this.Hidden1.Text = idx.ToString();
return idx;
}
/* protected void btnDelItem_Click(object sender, EventArgs e)
{
Ext.Net.Checkbox checkbox = new Ext.Net.Checkbox();
for (int i = 0; i < this.splitFieldSet.Items.Count; i++)
{
checkbox = (Ext.Net.Checkbox)this.splitFieldSet.Items[i].FindControl("checkbox" + i + "-inputEl");
Control control = this.Panel1.FindControl(this.btnSave.ID);
String btnSaveId = control.ID;
}
}
*/