When you open the page during web programming, let the DROPDOWNLIST control to select a certain value problem, implement the code as follows:
For (int i = 0; i
The following code mainly implements how to click "Edit" in the DataGrid, in the editing state, the DropDownList control in the template column selects a certain value.
Private void DGSinger_ItemDatabase (Object sender, system.web.ui.webcontrols.dataGriditeMEventArgs e) {listiteMType List = E.Item.ItemType;
IF (List == ListItemType.editItem) {DropDownList Ddlfamily = (DropdownList) E.Item.FindControl ("DdleditFamily"); DataRowView DRV = (DataRowView) E.Item.DataItem; INT i;
For (i = 0; i
DropDownList DDLREGION = (DropdownList) E.Item.FindControl (DDLITREGION); DATAROWVIEW DAV = (DATAROWVIEW) E.Item.DataItem; for (i = 0; i