protected void btn_editar(object sender, ImageClickEventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowIndex == GridView1.SelectedIndex) { GridView1.SetEditRow(row.RowIndex); row.BackColor = ColorTranslator.FromHtml("#A1DCF2"); row.ToolTip = string.Empty; } else { row.BackColor = GridView1.BackColor; } } }
protected void btn_editarClick(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowIndex == GridView1.SelectedIndex) { //GridView1.SelectedRow.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(GridView1, "Edit$" + GridView1.SelectedRow.RowIndex); GridView1.SetEditRow(row.RowIndex); row.BackColor = ColorTranslator.FromHtml("#A1DCF2"); row.ToolTip = string.Empty; } else { row.BackColor = GridView1.BackColor; } } }
protected void btn_orden_editar_Click(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowIndex == GridView1.SelectedIndex) { //GridView1.SelectedRow.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(GridView1, "Edit$" + GridView1.SelectedRow.RowIndex); GridView1.SetEditRow(row.RowIndex); row.BackColor = ColorTranslator.FromHtml("#8E7070"); //ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + ((Label)GridView1.SelectedRow.FindControl("Label7")).Text.ToString() + " Ocupado" + "');", true); row.ToolTip = string.Empty; } else { row.BackColor = GridView1.BackColor; } } }