if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(GridView1, "Select$" + e.Row.RowIndex); e.Row.ToolTip = "Click to select this row."; }
protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowIndex == GridView1.SelectedIndex) { TABLEzemota.Visible = true; sachvnebeli.Text = (row.FindControl("Label4") as Label).Text; checka.Checked = (row.FindControl("CheckBox1") as CheckBox).Checked; addState.Text = (row.FindControl("Label6") as Label).Text; AddSach.Text = (row.FindControl("Label9") as Label).Text; addnote.Text = (row.FindControl("Label17") as Label).Text; } else { row.BackColor = ColorTranslator.FromHtml("#FFFFFF"); row.ToolTip = "Click to select this row."; } }
RowEditing
RowDataBound
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)