/// <summary> /// Handles the RowDataBound event of the gBlockTypes control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewRowEventArgs" /> instance containing the event data.</param> protected void gBlockTypes_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { BlockTypeInfoRow blockTypeInfoRow = e.Row.DataItem as BlockTypeInfoRow; if (blockTypeInfoRow != null) { if (blockTypeInfoRow.Path.IsNotNullOrWhiteSpace()) { string blockPath = Request.MapPath(blockTypeInfoRow.Path); if (!System.IO.File.Exists(blockPath)) { e.Row.Cells[4].Text = "<span class='label label-danger'>Missing</span>"; } else { e.Row.Cells[4].Text = "<span class='label label-success'>Found</span>"; } } else if (blockTypeInfoRow.EntityTypeId.HasValue) { var entityType = EntityTypeCache.Get(blockTypeInfoRow.EntityTypeId.Value); e.Row.Cells[4].Text = string.Format("<span class='label label-info'>{0}</span>", entityType.Name); } else { e.Row.Cells[4].Text = "<span class='label label-danger'>Unknown</span>"; } } }
protected void grdMemberList_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow) { return; } e.Row.Visible = false; }
protected void LV2_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.Cells.Count > 3) { e.Row.Cells[2].Visible = false; e.Row.Cells[3].Visible = false; } }
public void dlstHSDeclare_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow) { System.Web.UI.WebControls.Literal lblDeclareStatus = (System.Web.UI.WebControls.Literal)e.Row.FindControl("litDeclareStatus"); SetRowValue(lblDeclareStatus); } }
protected void gvIntegrations_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow) //the header Row is also considered for data bound { if (((DataRowView)e.Row.DataItem).Row["INT_LIST_ID"].ToString() == "") { e.Row.Cells[1].Controls.RemoveAt(0); e.Row.Cells[1].Controls.Add(new System.Web.UI.LiteralControl("No Integrations")); } } }
/// <summary> /// 行鼠标悬停效果 /// </summary> /// <param name="e"></param> protected override void OnRowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs e) { base.OnRowDataBound(e); if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow) { if (!mouseHoverColor.IsNullOrEmpty()) { e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='" + mouseHoverColor + "';"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;"); } } }
protected void gData_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { var item = e.Row.DataItem; if (item is SignatureMemberData) { var signatureData = item as SignatureMemberData; if (signatureData.Warning) { e.Row.BackColor = System.Drawing.Color.LightCoral; } } }
/// <summary> /// Handles the RowDataBound event of the gBlockTypes control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewRowEventArgs" /> instance containing the event data.</param> protected void gBlockTypes_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.DataItem != null) { string blockPath = Request.MapPath(e.Row.DataItem.GetPropertyValue("Path") as string); if (!System.IO.File.Exists(blockPath)) { e.Row.Cells[4].Text = "<span class='label label-danger'>Missing</span>"; } else { e.Row.Cells[4].Text = "<span class='label label-success'>Found</span>"; } } }
private void grdHSDocking_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow) { System.Web.UI.WebControls.Label lblOrderStatus = (System.Web.UI.WebControls.Label)e.Row.FindControl("lblOrderStatus"); System.Web.UI.WebControls.Label lblLogisticsStatus = (System.Web.UI.WebControls.Label)e.Row.FindControl("lblLogisticsStatus"); System.Web.UI.WebControls.Label lblPaymentStatus = (System.Web.UI.WebControls.Label)e.Row.FindControl("lblPaymentStatus"); System.Web.UI.WebControls.Label lblPayerIdStatus = (System.Web.UI.WebControls.Label)e.Row.FindControl("lblPayerIdStatus"); SetRowValue(lblOrderStatus); SetRowValue(lblLogisticsStatus); SetRowValue(lblPaymentStatus); SetRowValue(lblPayerIdStatus); } }
/// <summary> /// Handles the RowDataBound event of the rGrid control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewRowEventArgs"/> instance containing the event data.</param> protected void rGrid_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { ComponentDescription componentDescription = e.Row.DataItem as ComponentDescription; if (componentDescription != null) { HtmlAnchor aSecure = e.Row.FindControl("aSecure") as HtmlAnchor; if (aSecure != null) { aSecure.Visible = true; var entityType = EntityTypeCache.Read(componentDescription.Type); string url = Page.ResolveUrl(string.Format("~/Secure/{0}/{1}?t={2}&pb=&sb=Done", entityType.Id, 0, componentDescription.Name + " Security")); aSecure.HRef = "javascript: Rock.controls.modal.show($(this), '" + url + "')"; } } }
/// <summary> /// Handles the RowDataBound event of the attribute grids. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewRowEventArgs"/> instance containing the event data.</param> void gAttributes_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.DataItem != null) { Attribute attribute = e.Row.DataItem as Attribute; if (attribute != null) { if (!string.IsNullOrEmpty(attribute.EntityTypeQualifierValue) && attribute.EntityTypeQualifierValue != PageParameter("GroupTypeId")) { // Inherited Attribute e.Row.Cells[0].Text = string.Format( "<span class='muted'>{0} <span class='inherited'>(Inherited from <a href='{1}' target='_blank'>{2}</a>)</span></span>", attribute.Name, Page.ResolveUrl("~/GroupType/" + attribute.EntityTypeQualifierValue), attribute.Description); // TODO, once a GroupTypeCache object exists, the name could be retrieved from the cache object instead of using the description property to hold it (we don't want to do a db qry on every row) e.Row.Cells[1].Controls.Clear(); // Edit e.Row.Cells[2].Controls.Clear(); // Delete } } } }
protected void gvApolice_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { e.Row.Cells[0].Visible = false; }
protected void grdTip_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { }
protected void grdClientes_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { }
protected void grdGastosExtraordinarios_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { e.Row.Cells[col_ID_Expensa].Visible = false; }
protected void FileDrop_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { String s = ""; }