private void jsgConditions_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record) { GridEXFormatCondition formatCondition = (GridEXFormatCondition)e.Row.DataRow; e.Row.RowStyle = new GridEXFormatStyle(formatCondition.FormatStyle); } }
private void gridDienThoai_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { try { HienThiAnhTrangThai_MauChu(e.Row); } catch (Exception ex) { } }
private void dgvData_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.RowType == RowType.Record) { //e.Row.BeginEdit(); e.Row.Cells["Description"].Value = CalculateDetailValue(e.Row); //e.Row.Cells["DAG_ID"]._Value = txtCode.Text; //e.Row.EndEdit(); } }
private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { CSKHChiTiet objCSKH = (CSKHChiTiet)e.Row.DataRow; if (objCSKH.LAN1_Gio == DateTime.MinValue) { e.Row.Cells["LAN1_Gio"].Text = ""; } if (objCSKH.LAN2_Gio == DateTime.MinValue) { e.Row.Cells["LAN2_Gio"].Text = ""; } if (objCSKH.LAN3_Gio == DateTime.MinValue) { e.Row.Cells["LAN3_Gio"].Text = ""; } else { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.BackColor = Color.Yellow; e.Row.RowStyle = RowStyle; } if (objCSKH.LAN4_Gio == DateTime.MinValue) { e.Row.Cells["LAN4_Gio"].Text = ""; } else { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.BackColor = Color.Red; e.Row.RowStyle = RowStyle; } if (objCSKH.CSKH_Lan1_Gio == DateTime.MinValue) { e.Row.Cells["CSKH_Lan1_Gio"].Text = ""; } if (objCSKH.CSKH_Lan2_Gio == DateTime.MinValue) { e.Row.Cells["CSKH_Lan2_Gio"].Text = ""; } if (objCSKH.CSKH_Lan3_Gio == DateTime.MinValue) { e.Row.Cells["CSKH_Lan3_Gio"].Text = ""; } if (objCSKH.CSKH_Lan4_Gio == DateTime.MinValue) { e.Row.Cells["CSKH_Lan4_Gio"].Text = ""; } if (objCSKH.GioDonKhach == DateTime.MinValue) { e.Row.Cells["GioDon"].Text = ""; } }
private void gridCustomerTransaction_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.RowType == RowType.Record & e.Row.Cells.Count > 0) { DateTime dt = (DateTime)e.Row.Cells["TransactionDate"].Value; string persianDate = "0".Substring(0, 2 - persianCalendar.GetHour(dt).ToString().Length) + persianCalendar.GetHour(dt).ToString() + ":" + "0".Substring(0, 2 - persianCalendar.GetMinute(dt).ToString().Length) + persianCalendar.GetMinute(dt).ToString() + " " + persianCalendar.GetYear(dt).ToString() + "/" + "0".Substring(0, 2 - persianCalendar.GetMonth(dt).ToString().Length) + persianCalendar.GetMonth(dt).ToString() + "/" + "0".Substring(0, 2 - persianCalendar.GetDayOfMonth(dt).ToString().Length) + persianCalendar.GetDayOfMonth(dt).ToString(); e.Row.Cells["TransactionDate"].Text = persianDate; } }
private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { foreach (int index in this.checkboxes.ToArray()) { int val = Int32.Parse(e.Row.Cells[index].Value.ToString()); if (val == 0) { e.Row.Cells[index].Text = "بله"; } else { e.Row.Cells[index].Text = "خیر"; } } }
private void gridBaoCaoBieuMau1_FormattingRow_1(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { try { if (e.Row.RowType == RowType.Record) { GridEXRow row = e.Row; if (row.Cells["HDTruoc"] != null && row.Cells["HDTruoc"].Value.ToString() == "1") { row.Cells["HDTruoc"].Text = "x"; } else { row.Cells["HDTruoc"].Text = ""; } if (row.Cells["KhongHDTruoc"] != null && row.Cells["KhongHDTruoc"].Value.ToString() == "1") { row.Cells["KhongHDTruoc"].Text = "x"; } else { row.Cells["KhongHDTruoc"].Text = ""; } if (row.Cells["HDSau"] != null && row.Cells["HDSau"].Value.ToString() == "1") { row.Cells["HDSau"].Text = "x"; } else { row.Cells["HDSau"].Text = ""; } if (row.Cells["KhongHDSau"] != null && row.Cells["KhongHDSau"].Value.ToString() == "1") { row.Cells["KhongHDSau"].Text = "x"; } else { row.Cells["KhongHDSau"].Text = ""; } } } catch (Exception ex) { } }
private void gridDSXe_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { KiemSoatXeLienLac objKSLL = (KiemSoatXeLienLac)e.Row.DataRow; if (objKSLL.ThoiDiemBao == DateTime.MinValue) { e.Row.Cells["ThoiDiemBao"].Text = ""; } if (objKSLL.TrangThaiTong == 1) // ve mat lien lac Ăn ca { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.Red; e.Row.RowStyle = RowStyle; } else if (objKSLL.TrangThaiTong == 2) // xe hoat dong { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.Blue; e.Row.RowStyle = RowStyle; } else if (objKSLL.TrangThaiTong == 3) // xe vê { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.DeepPink; e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle; } else if (objKSLL.TrangThaiTong == 4) // xe nghi { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.Gold; e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle; } else if (objKSLL.TrangThaiTong == 5) // xe { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.Green; e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle; } else { GridEXFormatStyle RowStyle = new GridEXFormatStyle(); RowStyle.ForeColor = Color.Black; e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle; } }
private void grexTribunalMemberWorkload_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { try { if (e.Row.DataRow != null) { e.Row.Cells["uiVacationUpcoming"].Text = Properties.Resources.UINo; // set default if (e.Row.Cells["VacationUpcoming"].Value != null) { int upcomingVacation; try { if (((System.Data.DataRowView)e.Row.DataRow).Row.IsNull("VacationUpcoming")) { upcomingVacation = 0; } else { upcomingVacation = (int)e.Row.Cells["VacationUpcoming"].Value; } } catch (Exception x) { upcomingVacation = 0; } if (upcomingVacation > 0) { e.Row.Cells["uiVacationUpcoming"].Text = Properties.Resources.UIYes; } } } UIHelper.FormatDateGridEXColumn("TermExpiryDate", e); } catch (Exception x) { UIHelper.HandleUIException(x); } }
private void grdDieuHanhTheoNgay_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.RowType == RowType.GroupFooter) { try { double donDuoc = Convert.ToDouble(e.Row.Cells["TongDonDuoc"].Value.ToString()); double cuocTaxi = Convert.ToDouble(e.Row.Cells["TongGoiTaxi"].Value.ToString()); double goiLai = Convert.ToDouble(e.Row.Cells["TongGoiLai"].Value.ToString()); if (cuocTaxi > 0) { e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0:#.#}", Convert.ToDouble(donDuoc / cuocTaxi * 100)); e.Row.Cells["PhanTramGoiLai"].Text = string.Format("{0:#.#}", Convert.ToDouble(goiLai / cuocTaxi * 100)); } } catch (Exception ex) { } } }
private void grexAppealsReadyForAssignment_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { try { //int last = grexAppealsReadyForAssignment.LastVisibleRow(false); //if (e.Row.Position < grexAppealsReadyForAssignment.FirstRow || e.Row.Position > last + 1) // return; // CalcSC(e); //e.Row.Cells["uiIsCharter"].Text = Properties.Resources.UINA; //if ((bool)e.Row.Cells["IsCharter"].Value) //{ // e.Row.Cells["uiIsCharter"].Text = Properties.Resources.UIYes; //} UIHelper.FormatDateGridEXColumn("OpenedDate", e); UIHelper.FormatDateGridEXColumn("RecDate", e); } catch (Exception x) { UIHelper.HandleUIException(x); } }
private void GridEX1_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.RowType == RowType.Record) { decimal result = 0; //You can get the values directly from the GridEXRow object short quantity = (short)e.Row.Cells["Quantity"].Value; decimal unitPrice = (decimal)e.Row.Cells["UnitPrice"].Value; float discount = (float)e.Row.Cells["Discount"].Value; result = Convert.ToDecimal(quantity) * unitPrice * Convert.ToDecimal(1 - discount); /* * //or you can get the values from the Order_DetailsRow this GridEXRow represents. * System.Data.DataRowView rowView = (System.Data.DataRowView)e.Row.DataRow; * NorthWind.Order_DetailsRow detail = (NorthWind.Order_DetailsRow)rowView.Row; * * result = Convert.ToDecimal(detail.Quantity) * detail.UnitPrice * Convert.ToDecimal(((float)1-detail.Discount)); */ e.Row.Cells["Total"].Value = result; } }
private void grdGroupList_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { if (e.Row.Cells.Count > 0) { if (e.Row.Cells["HeaderCaption"].Text.Length == 0) { e.Row.Cells["HeaderCaption"].Text = "New group"; } GridEXGroup group = (GridEXGroup)e.Row.DataRow; if (group.CustomGroup != null) { if (group.CustomGroup.CustomGroupType == CustomGroupType.CompositeColumns) { e.Row.Cells["HeaderCaption"].ImageIndex = 7; } else { e.Row.Cells["HeaderCaption"].ImageIndex = 1; } } else { if (group.Column != null) { e.Row.Cells["HeaderCaption"].ImageIndex = 3; } else { e.Row.Cells["HeaderCaption"].ImageIndex = 4; } } } }
private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { }
private void grdMoiGioiCuocGoiThap_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { HienThiTrangThaiChu(e.Row); }
private void gridBaoCaoBieuMau1_FormattingRow_1(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { DinhDangCells(e.Row); }
private void grdBaoCaoGiaiQuyet_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e) { HienThiTrangThaiChu(e.Row); }