This is a trick. Just write it here for external memory.
The condition is this:
In a datagrid, if there is a value, and the value is gained from database;
so when you modify, the value select become a dropdownlist, how can
And if the dropdownlist is gained from database, and when you modify, you have a exitex value, how can the dropdownlist select the existed value as default?
The code is as this:
string TM=((Label)e.Item.FindControl("lblHideTM")).Text;
for(int i=0;i
ddlTrainingMethod.SelectedIndex=i;
if(ddlTrainingMethod.SelectedItem.Text==TM){
return;
}
}
No comments:
Post a Comment