inside grid view row command on row command edit update
i want when edit button click then edit button hide and save button visible true
and code
protected void GridClose_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "edit1")
{
GridViewRow row = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
TextBox txt_tracking_num = row.FindControl("txt_tracking_num") as TextBox;
DropDownList dropdwnlist = row.FindControl("dropdwnlist") as DropDownList;
LinkButton lnksave = row.FindControl("save") as LinkButton;
LinkButton edit = row.FindControl("edit") as LinkButton;
txt_tracking_num.Visible = true;
dropdwnlist.Visible = true;
lnksave.Visible = true;
}
lnksave.Visible = true;
this is not valid show in error

Chetan RanpariyaPosted Jan 17, 2017, 9:07 AM
Salman BegPosted Jan 17, 2017, 7:55 AM
Devendra KumarPosted Jan 17, 2017, 7:52 AM
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Salman BegPosted Jan 17, 2017, 6:58 AM
Chetan RanpariyaPosted Jan 17, 2017, 6:54 AM
Salman BegPosted Jan 17, 2017, 6:41 AM