protected void gvDetailKartuPiutang_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "HutangPokok") { if (e.Value.ToString() != " ") { decimal price = Convert.ToDecimal(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } else if (e.Column.FieldName == "Bunga") { if (e.Value.ToString() != " ") { decimal price = Convert.ToDecimal(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } else if (e.Column.FieldName == "Total") { if (e.Value.ToString() != " ") { decimal price = Convert.ToDecimal(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } }
protected void gvSisaPencairan_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.Caption == "No") { e.DisplayText = (Convert.ToInt32(e.VisibleRowIndex) + 1).ToString(); } }
protected void gvReport_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (!String.IsNullOrEmpty(e.Value.ToString())) { if (e.Column.FieldName == "HutangPokok") { if (e.Value.ToString() != "" && e.Value.ToString() != " ") { if (e.Value.ToString() != "0") { double price = Convert.ToDouble(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } } else if (e.Column.FieldName == "Bunga") { if (e.Value.ToString() != "" && e.Value.ToString() != " ") { if (e.Value.ToString() != "0") { double price = Convert.ToDouble(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } } else if (e.Column.FieldName == "Total") { if (e.Value.ToString() != "" && e.Value.ToString() != " ") { if (e.Value.ToString() != "0") { double price = Convert.ToDouble(e.Value); e.DisplayText = string.Format("{0:#,##}", price); } } } else if (e.Column.FieldName == "NoRef") { if (!String.IsNullOrEmpty(e.Value.ToString())) { if (e.Column.FieldName == "NilaiAdv") { e.DisplayText = "asad"; } } else { if (e.Column.FieldName == "NilaiAdv") { e.DisplayText = "udin"; } } } } }
protected void gvPembayaran_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.VisibleRowIndex >= 0) { if (e.Column.Name == "TglJatuhTempo") { var proposalNumber = gvPembayaran.GetRowValues(e.VisibleRowIndex, "proposal_number").ToString(); var data = bll.GetComplementColumnValue(proposalNumber); if (data.Rows.Count > 0) { e.DisplayText = data.Rows[0]["JatuhTempo"].ToString(); } } if (e.Column.Name == "Init") { var proposalNumber = gvPembayaran.GetRowValues(e.VisibleRowIndex, "proposal_number").ToString(); var data = bll.GetComplementColumnValue(proposalNumber); if (data.Rows.Count > 0) { e.DisplayText = data.Rows[0]["Kolekti"].ToString(); } } } }
protected void ASPxGridView1_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.Caption == "№") { e.DisplayText = e.VisibleRowIndex.ToString(); } }
protected void ASPxGridView1_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { Stopwatch sw = System.Diagnostics.Stopwatch.StartNew(); //some operations sw.Stop(); AddEventLog(String.Format("CustomColumnDisplayText, FieldName:{0}, VisibleIndex: {1} , Time: " + sw.Elapsed.TotalMilliseconds, e.Column.FieldName, e.VisibleRowIndex)); }
protected void xgvPerson_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "DEPTID" || e.Column.FieldName == "MAINDEPTID") { e.DisplayText = (from dept in dc.Department where dept.Deptnumber == e.Value.ToString() select dept).Single().Deptname; } }
protected void gridUser_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "USERSTATUS") { e.DisplayText = UserHandle.ReturnState(TypeParse.StrToInt(e.GetFieldValue("USERSTATUS"), 0)); } //if (e.Column.FieldName == "ISONLINE") //{ // e.DisplayText = e.GetFieldValue("ISONLINE") == "1" ? "在线" : "离线"; //} }
protected void ASPxGridView1_CustomGroupDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "UnitPrice") { double d = Math.Floor(Convert.ToDouble(e.Value) / 10); string displayText = string.Format("{0:c} - {1:c} ", d * 10, (d + 1) * 10); if (d > 9) { displayText = string.Format(">= {0:c} ", 100); } e.DisplayText = displayText; } }
protected void gridviewReceiptVoucher_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName.Equals("RowStatus")) { if (e.Value.Equals(Utility.Constant.ROWSTATUS_BOOKED_ENTRY)) { e.DisplayText = "Đã hạch toán"; } else { e.DisplayText = "Chưa hạch toán"; } } }
protected void grdDataWarehouse_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName.Equals("RowStatus")) { if (e.Value.Equals(Constant.ROWSTATUS_ACTIVE)) { e.DisplayText = "Hoạt động"; } else if (e.Value.Equals(Constant.ROWSTATUS_INACTIVE)) { e.DisplayText = "Ngừng hoạt động"; } } }
protected void grdInventoryCommand_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "ApprovalStatus") { if (char.Parse(e.Value.ToString()).Equals(Constant.APRROVE_YES)) { e.DisplayText = "Đã duyệt"; } else { e.DisplayText = "Chưa duyệt"; } } }
protected void grdDataServiceCategory_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName.Equals("BuyingServiceCategoryId.RowStatus")) { //if (e.Value.Equals(DbRowStatusCode.Active.Value)) //{ // e.DisplayText = "Hoạt động"; //} //else if (e.Value.Equals(DbRowStatusCode.Inactive.Value)) //{ // e.DisplayText = "Ngừng hoạt động"; //} } }
protected void grdBillActor_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { }
protected void gridviewAllocationAccountTemplate_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) { if (e.Column.FieldName.Equals("CardSite")) { if (e.Value.Equals('D')) { e.DisplayText = "Nợ"; } else if (e.Value.Equals('C')) { e.DisplayText = "Có"; } } else if (e.Column.FieldName.Equals("AccountId!Key")) { Guid accountId = (Guid)e.Value; e.DisplayText = session.GetObjectByKey <NAS.DAL.Accounting.AccountChart.Account>(accountId).Code; } }