private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
//要在这里找到放在Datagrid 的footer的控件。怎样找到,请高手指教。
foreach(DataGridItem i in DataGrid1.Items)
{
if (i.ItemType==ListItemType.Footer)
{
DropDownList ddl =(DropDownList)i.Cells[0].FindContrl("DropDownList1");
//Cells对应所在的列
}
}
}
{
//要在这里找到放在Datagrid 的footer的控件。怎样找到,请高手指教。
foreach(DataGridItem i in DataGrid1.Items)
{
if (i.ItemType==ListItemType.Footer)
{
DropDownList ddl =(DropDownList)i.Cells[0].FindContrl("DropDownList1");
//Cells对应所在的列
}
}
}
Button btn =(Button)i.Cells[0].FindContrl("Button1");
{
if(DataGrid.Items[i].ItemType==ListItemType.Footer)
{
DropDownList dd =(DropDownList)DataGrid.Items[i].FindContrl("DropDownList1");
...........
}
}