/// <summary> /// The render. /// </summary> /// <param name="writer"> /// The writer. /// </param> protected override void Render(HtmlTextWriter writer) { //если задизаблено меню то нечего выбирать элементы, иначе кнопки останутся задизаблены в менюшке а рядок сменится. if (!menu1.Enabled) { base.Render(writer); return; } UtilsHelper.AddAttributesToGridRow(Page.ClientScript, gridView); UtilsHelper.AddDoubleClickAttributeToGrid(Page.ClientScript, gridView); //foreach (GridViewRow r in gridView.Rows) //{ // if (r.RowType == DataControlRowType.DataRow) // { // r.Attributes["onmouseover"] = "this.style.cursor='pointer';this.style.textDecoration='underline';"; // r.Attributes["onmouseout"] = "this.style.textDecoration='none';"; // r.ToolTip = "Click to select row"; // r.Attributes["onclick"] = Page.ClientScript.GetPostBackEventReference(gridView, "Select$" + r.RowIndex, true); // } //} base.Render(writer); }
protected void EnablePdpGrid(bool value) { pdpsGridView.Enabled = value; if (!value) { foreach (GridViewRow row in pdpsGridView.Rows) { row.Attributes.Remove("onmouseover"); row.Attributes.Remove("onmouseout"); row.Attributes.Remove("onclick"); row.Attributes.Remove("ondblclick"); } } else { UtilsHelper.AddAttributesToGridRow(Page.ClientScript, pdpsGridView); UtilsHelper.AddDoubleClickAttributeToGrid(Page.ClientScript, pdpsGridView); } contentUpdatePanel.Update(); menu1.Enabled = value; menuPanel.Update(); }
public void RenderInPage() { UtilsHelper.AddAttributesToGridRow(Page.ClientScript, smosGridView); UtilsHelper.AddDoubleClickAttributeToGrid(Page.ClientScript, smosGridView); }
protected override void Render(HtmlTextWriter writer) { UtilsHelper.AddAttributesToGridRow(Page.ClientScript, grid); UtilsHelper.AddDoubleClickAttributeToGrid(Page.ClientScript, grid); base.Render(writer); }