test 一下
protected void CheckAll_CheckedChanged(object sender, System.EventArgs e)
...{
//改變列的選定,實現全選或全不選。
CheckBox chkExport ;
if( CheckAll.Checked)
...{
foreach(DataGridItem oDataGridItem in MyDataGrid.Items)
...{
chkExport = (CheckBox)oDataGridItem.FindControl("chkExport");
chkExport.Checked = true;
}
}
else
...{
foreach(DataGridItem oDataGridItem in MyDataGrid.Items)
...{
chkExport = (CheckBox)oDataGridItem.FindControl("chkExport");
chkExport.Checked = false;
}
}
}