protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("edit")) { int id = Convert.ToInt32(e.CommandArgument); string r = GridView1.DataKeys[id - 1].Value.ToString(); GridViewRow row = GridView1.Rows[id]; DetailsView dv = (DetailsView)ridView1.Rows[id].FindControl("DetailsView1"); // getting it as null dv.DataSource = ds.Tables[0]; // Object refrence not set to instance of object: Error dv.DataBind(); dv.Visible = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)