hi,
in my project i have one gridview columns(Name,Address,Country,Status and one link button )if i click in drop down list the status should be changed like(active(or)inactive)
while the drop down list is clicked at the time the status is active means then it should be changed to inactive like that viseversa inactive to active.how to do this plz help me.if posible plz tell step by step im in begginer level
Drop downlist within gridview
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Bhabani prasad Dash168 reputationPosted Jun 22, 2013, 12:41 AM EDT
{
DropDownList ddlcurrentstatus =(DropDownList)sender;
GridViewRow grdvobj = ((GridViewRow)ddlcurrentstatus.Parent.Parent);
Label lbl_currentstatus = (Label)grdvobj.FindControl("lbl_status");
if (lbl_currentstatus != null)
lbl_currentstatus.Text = ddlcurrentstatus.SelectedItem.Text;
}
i solve the issue if any problm plz contact