I tried to change a dropdownlist.enabled which in gridview row.
i write this code block.
if (isEdit && index == e.Row.RowIndex)
{
foreach (GridViewRow item in GridView1.Rows)
{
if (item.RowIndex == index)
{
DataRowView rowView2 = (DataRowView)item.DataItem;
DDL = (DropDownList)item.FindControl("ddlLocation");
DDL.Enabled = true;
isEdit = false;
}
}
}
and get isEdit from GridView1_RowEditing
like :
isEdit = true;
and get index from row command like :
if (e.CommandName == "Edit")
{
index = Convert.ToInt32(e.CommandArgument);
}
is anyone can help me ?