protected void gvtotqty_onrowdatabound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(gvtotqty, "Select$" + e.Row.RowIndex); e.Row.ToolTip = "Click to select this row."; } } protected void gvtotqty_onselectedindexchanged(object sender, EventArgs e) { foreach (GridViewRow row in gvtotqty.Rows) { if (row.RowIndex == gvtotqty.SelectedIndex) { Session["rowindex"]=row.RowIndex; row.BackColor = ColorTranslator.FromHtml("#A1DCF2"); row.ToolTip = string.Empty; } else { row.BackColor = ColorTranslator.FromHtml("#FFFFFF"); row.ToolTip = "Click to select this row."; } } }
Page.ClientScript.GetPostBackClientHyperlink
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)