在ItemDataBound中写如下代码:
Dim itemType As ListItemType = e.Item.ItemType
If itemType = ListItemType.Footer Then
dim ddl as DropDownList=e.item.findcontrol("...")
....
End If
Dim itemType As ListItemType = e.Item.ItemType
If itemType = ListItemType.Footer Then
dim ddl as DropDownList=e.item.findcontrol("...")
....
End If
Dim itemType As ListItemType = e.Item.ItemType
If itemType = ListItemType.Footer Then
dim ddl as DropDownList=e.item.findcontrol("...")
....
End If
DropDownList1.CleanSelection();
DropDownList1.Items.Insert(0,"---All---");
allitem.Text = "ALL";
allitem.Value = "";
DropDownList1.Items.Add(allitem);绑定数据can in PreRender(object sender, System.EventArgs e) too