private void gridView1_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e) { if (e.Column.Caption == "订单状态") { if (e.CellValue.ToString() == "正常") e.Appearance.BackColor = Color.Green; else e.Appearance.BackColor = Color.Red; } }
private void gridView1_CustomRowCellEdit(object sender, XtraGrid.Views.Grid.CustomRowCellEditEventArgs e) { progress.LookAndFeel.SkinName = "Money Twins"; progress.LookAndFeel.UseDefaultLookAndFeel = false; progress.ShowTitle = true; //progress.StartColor = Color.Green; //progress.EndColor = Color.Red; if (e.Column.Caption == "订单进度") { e.RepositoryItem = progress; } }
void layoutView_CustomDrawCardFieldValue(object sender, XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) { if(e.Column != colPhoto) return; e.DefaultDraw(); e.Graphics.DrawRectangle(e.Cache.GetPen(layoutView.Appearance.FieldCaption.ForeColor), e.Bounds); e.Handled = true; }
void view_FocusedRowChanged(object sender, XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { richEditControl.Options.MailMerge.ActiveRecord = view.ViewRowHandleToDataSourceIndex(view.FocusedRowHandle); }
void gvEvaluations_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e) { Evaluation evaluation = gvEvaluations.GetRow(e.RowHandle) as Evaluation; if(evaluation == null) return; if(evaluation.Rating == EvaluationRating.Good) e.Appearance.ForeColor = ColorHelper.InformationColor; if(evaluation.Rating == EvaluationRating.Poor) e.Appearance.ForeColor = ColorHelper.CriticalColor; }
private void GVMarque_CellValueChanged(object sender, XtraGrid.Views.Base.CellValueChangedEventArgs e) { _isAnnonceurModified = true; }
void gridView_RowStyle(object sender, XtraGrid.Views.Grid.RowStyleEventArgs e) { Product product = gridView.GetRow(e.RowHandle) as Product; if(product != null && !product.Available) e.Appearance.ForeColor = ColorHelper.DisabledTextColor; }
private void gridView1_RowClick(object sender, XtraGrid.Views.Grid.RowClickEventArgs e) { frmPlanDetail frm = new frmPlanDetail(); frm.ShowDialog(); }
private void gridView1_RowCellClick(object sender, XtraGrid.Views.Grid.RowCellClickEventArgs e) { if (e.Button == MouseButtons.Left && e.Clicks == 2) EditMessage(e.RowHandle); }
private void gridView1_RowCellClick(object sender, XtraGrid.Views.Grid.RowCellClickEventArgs e) { if(CurrentTask == null) return; if(e.Button == MouseButtons.Left && e.RowHandle >= 0 && e.Clicks == 2) OkClick(); }
private void gridView1_FocusedRowObjectChanged(object sender, XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e) { lbSubject.Text = string.Format("<image=#BO_Task><size=+2> <b>{0}", CurrentTask.Subject); lbDueDate.Text = string.Format("Due: {0:ddd, MMMM dd, yyyy}", CurrentTask.DueDate); }
private void gridView1_RowCellStyle(object sender, XtraGrid.Views.Grid.RowCellStyleEventArgs e) { if(e.RowHandle == gridView1.FocusedRowHandle && gridView1.FocusedColumn != e.Column) { e.Appearance.BackColor = gridView1.PaintAppearance.FocusedRow.BackColor; e.Appearance.ForeColor = gridView1.PaintAppearance.FocusedRow.ForeColor; } }