Beispiel #1
0
 //Event Customization
 private void GridControl1_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
 {
     if (e.Style.CellType == CustomCellTypes.DoubleTextBox.ToString() && e.DisplayText == "0.00")
     {
         e.DisplayText = "0";
     }
 }
        protected override void OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
        {
            base.OnDrawCellDisplayText(e);

            if (!UseGDI || e.Cancel)
            {
                return;
            }

            e.Cancel = GridGdiPaint.Instance.DrawText(e.Graphics, e.DisplayText, e.TextRectangle, e.Style);
        }
        private void ТаблицаExcel_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
        {
            string str = e.DisplayText.ToUpper();

            if ((str != null) && ((str == "NAN") || (str == "БЕСКОНЕЧНОСТЬ")))
            {
                if (!string.IsNullOrEmpty(e.Style.Format))
                {
                    e.DisplayText = 0.ToString(e.Style.Format);
                }
                else
                {
                    e.DisplayText = "0";
                }
            }
        }
Beispiel #4
0
 /// <summary>
 /// Display Text at runtime
 /// </summary>
 private void m_syncGrid_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
 {
     e.Cancel = GridGdiPaint.Instance.DrawText(e.Graphics, e.DisplayText, e.TextRectangle, e.Style);
 }
Beispiel #5
0
 /// <summary>
 /// Set the Display text
 /// </summary>
 void Grid_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
 {
     e.DisplayText = string.Empty;
 }