1,獲取UltraWebGrid選中行的信息
首先要設置UltraWebGrid選擇狀態爲行選擇模式。
string gridValue = UltraWebGrid1.DisplayLayout.SelectedRows[0].GetCellValue(this.UltraWebGrid1.Columns[0]).ToString();
string yqbh = UltraWebGrid1.DisplayLayout.Rows[i].GetCellValue(UltraWebGrid1.Columns[1]) .ToString ();
Infragistics.WebUI.UltraWebGrid.TemplatedColumn tcol =
(TemplatedColumn)UltraWebGrid1.Bands[0].Columns[0];//模板列
foreach(CellItem item in tcol.CellItems)
{
System.Web.UI.WebControls.CheckBox chkIsHaveRight =
(System.Web.UI.WebControls.CheckBox)item.FindControl("chbShenhe");
if(chkIsHaveRight.Checked == true)
{
//進行相關的操作
}
}