[Ext.Net]遍历checkboxGroup
[csharp] 前台方法:
var items = Ext.getCmp("CheckboxGroup1").items;
for (var i = 0; i < items.length; i++) {
if (items.itemAt(i).checked) {
}
}
后台方法:
Ext.Net.CheckboxGroup mygroup1=new CheckboxGroup();
mygroup1 = (Ext.Net.CheckboxGroup)this.form1.FindControl("ItemTypeGroup");
string itemtype = string.Empty;
for(int i=0;i<mygroup1.Items.Count;i++)
{
if (mygroup1.Items[i].Checked)
{
string tmp;
if (mygroup1.Items[i].BoxLabel == "非贸易品")
{
tmp = "'" + "N" + "'";
}
else
{
tmp = "'" + "Y" + "'";
}
itemtype = tmp + "," + itemtype;
}
}
X.Msg.Alert("xx",itemtype.Substring(0,itemtype.Length-1)).Show();
前台方法:
var items = Ext.getCmp("CheckboxGroup1").items;
for (var i = 0; i < items.length; i++) {
if (items.itemAt(i).checked) {
}
}
后台方法:
Ext.Net.CheckboxGroup mygroup1=new CheckboxGroup();
mygroup1 = (Ext.Net.CheckboxGroup)this.form1.FindControl("ItemTypeGroup");
string itemtype = string.Empty;
for(int i=0;i<mygroup1.Items.Count;i++)
{
if (mygroup1.Items[i].Checked)
{
string tmp;
if (mygroup1.Items[i].BoxLabel == "非贸易品")
{
tmp = "'" + "N" + "'";
}
else
{
tmp = "'" + "Y" + "'";
}
itemtype = tmp + "," + itemtype;
}
}
X.Msg.Alert("xx",itemtype.Substring(0,itemtype.Length-1)).Show();
上一篇: 三条情侣内裤
下一篇: as.net设置伪静态步骤