Mar 05, 2010, 3:28 AM
help:CheckboxGroup can not be displayed thanks
help:CheckboxGroup can not be displayed thanks!!!
ie no indication error,But the display is blank
this is my code:
private void BindCheckBox(int RoleID)
{
Tab1.Title = "RoleID:" + RoleID;
Accounts GetTree=new Accounts();
DataSet TreeDS = GetTree.GetAllTree(RoleID);
DataTable dt = TreeDS.Tables[0];
DataRow[] Pardrs = dt.Select("TParentID=0");
int xClass = 1;
foreach (DataRow p in Pardrs)
{
if (Pardrs.Length > 0)
{
Coolite.Ext.Web.Anchor chganc = new Anchor();
chganc.Horizontal = "99%";
FormLayout1.Anchors.Insert(0, chganc);
Coolite.Ext.Web.CheckboxGroup tempckg = new CheckboxGroup();
tempckg.FieldLabel = p["TName"].ToString();
tempckg.ID = "ckgroup" + p["TID"].ToString();
if (Convert.ToBoolean(xClass % 2))
{
tempckg.LabelCls = "xheckgroup";
}
chganc.Items.Add(tempckg);
xClass++;
DataRow[] drs = dt.Select("TParentID= " + p["TID"].ToString());
if (drs.Length > 0)
{
foreach (DataRow r in drs)
{
Coolite.Ext.Web.Checkbox ckbox = new Checkbox();
ckbox.ID = "ckbox" + r["TID"].ToString();
ckbox.Note = r["TID"].ToString();
ckbox.NoteCls = "notshow";
ckbox.BoxLabel = r["TName"].ToString();
if (r["isinc"].ToString()!="")
{
ckbox.Checked = true;
}
else
{
ckbox.Checked = false;
}
tempckg.Items.Add(ckbox);
}
}
Window1.Show();
}
}
}