Esempio n. 1
0
        private void gridViewInfo_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
        {
            WorldPlanningStatisticItem item = (WorldPlanningStatisticItem)gridViewInfo.GetRow(e.RowHandle);

            if (item == null)
            {
                return;
            }

            Graphics graphics = gridControlInfo.CreateGraphics();

            try
            {
                Size sf           = graphics.MeasureString("222", gridViewInfo.Appearance.Row.Font).ToSize();
                int  stringHeight = sf.Height;


                if (item.ItemType == WorldStaticticItemType.TargetedHours)
                {
                    e.RowHeight = stringHeight;
                }
                else if (item.ItemType == WorldStaticticItemType.SummPlannedWorkingHours)
                {
                    e.RowHeight = stringHeight;
                }
                else if (item.ItemType == WorldStaticticItemType.DifferenceInPercent)
                {
                    e.RowHeight = stringHeight * 2;
                }
            }
            finally
            {
                graphics.Dispose();
            }
        }
 //设置GridView行高
 private void gridView1_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         e.RowHeight = 35;
     }
 }
Esempio n. 3
0
 private void dpgaGridView_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
 {
     if (!dpgaGridControl.IsPrinting)
     {
         if (e.RowHeight > 100)
         {
             e.RowHeight = 100;
         }
     }
 }
Esempio n. 4
0
        private void bandedGridView1_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
        {
            TimeRange[] range = new TimeRange[2];
            range[0] = new TimeRange(660, 1080, Color.Red, Color.Purple);
            range[1] = new TimeRange(660, 1080, Color.Red, Color.Purple);

            DrawTimeRange dr = new DrawTimeRange();

            e.RowHeight = 40;
        }
Esempio n. 5
0
        private void gvPAYERelief_MeasurePreviewHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
        {
            var Row = (PAYEReliefeViewModel)gvPAYERelief.GetRow(e.RowHandle);

            //if (gvPAYERelief.FocusedRowHandle != e.RowHandle && (Row == null || String.IsNullOrWhiteSpace(Row.SavingError)))
            if (gvPAYERelief.FocusedRowHandle != e.RowHandle && (Row == null || String.IsNullOrWhiteSpace(Row.SavingError)))
            {
                e.RowHeight = 0;
            }
        }
        private void gridView1_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
        {
            object rowHeight = rowsSizes[gridView1.GetDataRow(e.RowHandle)];

            if (rowHeight != null)
            {
                e.RowHeight = Convert.ToInt32(rowHeight);
            }
            else
            {
                e.RowHeight = defaultRowHeight;
            }
        }
Esempio n. 7
0
 private void GridView_CalcRowHeight(object sender, DevExpress.XtraGrid.Views.Grid.RowHeightEventArgs e)
 {
     e.RowHeight = 25;
 }