if (e.Row.Band.Index == 0)
{
// 添加Checkbox
string strlink = "";
strlink = "";
//strlink = "<input type='checkbox' name ='ControlGridID' onclick='javascript:ChkUser_Click(this);'>";
strlink = "<input type='checkbox' name ='ControlGridID'run='server' ID='ControlGridID'>";
e.Row.Cells[0].Text = strlink;
}
foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow row in this.dg_Employee.DisplayLayout.Rows)
{
if (((CheckBox)dg_Employee.FindControl("ControlGridID")).Checked)
{
this.Label1.Text = activityid + "," + "'" + row.Cells.FromKey("TEMPCode").ToString() + "'";
}
//this.Label1.Text=activityid;
}
{
// 添加Checkbox
string strlink = "";
strlink = "";
//strlink = "<input type='checkbox' name ='ControlGridID' onclick='javascript:ChkUser_Click(this);'>";
strlink = "<input type='checkbox' name ='ControlGridID'run='server' ID='ControlGridID'>";
e.Row.Cells[0].Text = strlink;
}
foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow row in this.dg_Employee.DisplayLayout.Rows)
{
if (((CheckBox)dg_Employee.FindControl("ControlGridID")).Checked)
{
this.Label1.Text = activityid + "," + "'" + row.Cells.FromKey("TEMPCode").ToString() + "'";
}
//this.Label1.Text=activityid;
}
strlink = "<INPUT type='checkbox' name ='ControlGridID' runat='server' ID ='ControlGridID'>";
if (dg_Employee.Rows[i].Cells.FromKey("Checkbox").Text=="true")
{
this.Label1.Text = activityid + "," + "'" + row.Cells.FromKey("TEMPCode").ToString() + "'";
}
其中Checkbox是该列的key属性值