How to change value on selection of dropdown list control in datagid

How to change value on selection of dropdown list control in datagrid.

// drpmodify is dropdown list.
protected void drpmodify_SelectedIndexChanged(object sender, EventArgs e)
{

DropDownList list = (DropDownList)sender;
TableCell cell = list.Parent as TableCell;
DataGridItem item = cell.Parent as DataGridItem;
DropDownList index = (DropDownList)item.Cells[10].FindControl("drpmodify");
DropDownList drpmodify12 = null;
drpmodify12 = (DropDownList)index;


TextBox txtupdate = null;
txtupdate = (TextBox)item.Cells[11].FindControl("TxtUpdate");

if ((drpmodify12.SelectedValue == "N") || (drpmodify12.SelectedValue == "M") || (drpmodify12.SelectedValue == "NE") || (drpmodify12.SelectedValue == "DU") || (drpmodify12.SelectedValue == "D") || (drpmodify12.SelectedValue == "I"))
{
txtupdate.Text = "";
}

}

This is multi billion ruppes code

Comments

Popular posts from this blog

show (value1,value2) in one column in sql