protected void ASPxGridView1_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { if (e.VisibleIndex == ASPxGridView1.EditingRowVisibleIndex) { e.Cell.CssClass = "myCommandCell"; } }
protected void gvCardiologists_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { if (e.CommandCellType == DevExpress.Web.ASPxGridView.GridViewTableCommandCellType.Data) { if (user.Roles.Contains(Helper.Constants.VALIENT_ROLE)) { ASPxCheckBox chkc = gvCardiologists.FindRowCellTemplateControl(e.VisibleIndex, null, "chkCHRC") as ASPxCheckBox; ImageButton imgEng = gvCardiologists.FindRowCellTemplateControl(e.VisibleIndex, null, "imgEnglish") as ImageButton; ImageButton imgFrench = gvCardiologists.FindRowCellTemplateControl(e.VisibleIndex, null, "imgFrench") as ImageButton; // (e.Cell.Controls[0] as InternalCheckboxControl).Visible = chkc.Checked; // imgEng.Enabled = chkc.Checked; // imgFrench.Enabled = chkc.Checked; //imgEng.ImageUrl = chkc.Checked ? "~/images/icon_download.png" : "~/images/icon_download_gray.gif"; //imgFrench.ImageUrl = chkc.Checked ? "~/images/icon_download.png" : "~/images/icon_download_gray.gif"; } } }
protected void grvSys_Right_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { //if (e.CommandCellType == GridViewTableCommandCellType.Data) //{ // SYS_Right right = (SYS_Right)Session["Right"]; // for (int i = 0; i < e.Cell.Controls.Count; i++) // { // if (!right.IsCreate) // { // btnAdd.Enabled = false; // } // if (!right.IsUpdate) // { // e.Cell.Controls[0].Visible = false; // } // if (!right.IsDelete) // { // e.Cell.Controls[1].Visible = false; // } // } //} }
protected void gridMapping_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { try { if ((e.CommandColumn.Name == "colCommands") && (e.CommandCellType == GridViewTableCommandCellType.Data)) { ProductStateEnum state = (ProductStateEnum)gridMapping.GetRowValues(e.VisibleIndex, new String[] { "ProductState" }); if (state == ProductStateEnum.Excluded) { //disable button e.Cell.Controls[0].Visible = false; Label lbl = new Label(); lbl.Text = " "; e.Cell.Controls.Add(lbl); } } } catch (Exception ex) { Logger.Log(ex.ToString(), LogLevel.Error); } }
protected void Grid_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { if (hdnVoucherId.Value == "0") { return; } if (e.CommandCellType == GridViewTableCommandCellType.Data) { if (e.KeyValue.ToString() == "0") { foreach (Control control in e.Cell.Controls) { InternalWebControl checkBox = control as InternalWebControl; if (checkBox != null) { checkBox.GetType(); //((checkBox.GetType())).Checked = true; checkBox.Enabled = false; } } } } }
protected void grdDVT_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { }
protected void gvCardiologists_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { }
protected void gridMapping_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { try { if ((e.CommandColumn.Name == "colCommands") && (e.CommandCellType == GridViewTableCommandCellType.Data)) { ProductStateEnum state = (ProductStateEnum)gridMapping.GetRowValues(e.VisibleIndex, new String[] { "ProductState" }); if (state == ProductStateEnum.Excluded) { //disable button e.Cell.Controls[0].Visible = false; Label lbl = new Label(); lbl.Text = " "; e.Cell.Controls.Add(lbl); } } } catch (Exception ex) { Logger.Log(ex.ToString(), LogLevel.Error); } }
protected void Grid_HtmlCommandCellPrepared(object sender, ASPxGridViewTableCommandCellEventArgs e) { if (hdnVoucherId.Value == "0") { return; } if (e.CommandCellType == GridViewTableCommandCellType.Data) { if (e.KeyValue.ToString() == "0") foreach (Control control in e.Cell.Controls) { InternalWebControl checkBox = control as InternalWebControl; if (checkBox != null) { checkBox.GetType(); //((checkBox.GetType())).Checked = true; checkBox.Enabled = false; } } } }