예제 #1
0
파일: MyPlan.cs 프로젝트: Xeeshi/MaxBachat2
 private void TableModel_QueryRowWidt(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index != 1)
     {
         e.Size    = 100;
         e.Handled = true;
     }
 }
예제 #2
0
 /// <summary>
 /// Set Row height for Grid
 /// </summary>
 void GridQueryRowHeight(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index % 2 == 0)
     {
         e.Size    = 25;
         e.Handled = true;
     }
 }
예제 #3
0
 void GridQueryRowHeight(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index % 2 == 0)
     {
         e.Size    = (int)DpiAware.LogicalToDeviceUnits(25.0f);
         e.Handled = true;
     }
 }
예제 #4
0
 void gridControl1_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index != 18)
     {
         e.Size    = 25;
         e.Handled = true;
     }
     else
     {
         e.Size    = 150;
         e.Handled = true;
     }
 }
예제 #5
0
 /// <summary>
 /// Set Colwidth for GridGroupingControl
 /// </summary>
 void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index > 0)
     {
         if (e.Index > this.gridGroupingControl1.TableModel.ColCount - 4)
         {
             //Set column width
             e.Size = 120;
             return;
         }
         e.Size = 100;
     }
 }
예제 #6
0
 void gridControl1_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index != 18)
     {
         e.Size = (int)DpiAware.LogicalToDeviceUnits(25.0f); ;
         e.Handled = true;
     }
     else
     {
         e.Size = (int)DpiAware.LogicalToDeviceUnits(150.0f); ;
         e.Handled = true;
     }
 }
        private void grid_QueryColWidth(object sender, GridRowColSizeEventArgs e)
        {
            switch (_colSizeBehavior)
            {
            case GridColSizeBehavior.FillRightColumn:
                if (e.Index == this.grid.Model.ColCount)
                {
                    e.Size    = this.grid.ClientSize.Width - this.grid.Model.ColWidths.GetTotal(0, this.grid.Model.ColCount - 1);
                    e.Handled = true;
                }
                break;

            case GridColSizeBehavior.FillLeftColumn:
                if (e.Index == this.grid.Model.Cols.FrozenCount + 1)
                {
                    int leftPiece  = this.grid.Model.ColWidths.GetTotal(0, this.grid.Model.Cols.FrozenCount);
                    int rightPiece = this.grid.Model.ColWidths.GetTotal(this.grid.Model.Cols.FrozenCount + 2, this.grid.Model.ColCount);
                    e.Size    = this.grid.ClientSize.Width - leftPiece - rightPiece;
                    e.Handled = true;
                }
                break;

            //				case GridColSizeBehavior.FixedProportional:
            //					if(e.Index == this.grid.Model.ColCount)
            //					{
            //						e.Size = this.grid.ClientSize.Width - this.grid.Model.ColWidths.GetTotal(0, this.grid.Model.ColCount - 1);
            //					}
            //					else
            //					{
            //						e.Size = (int) (this.colRatios[e.Index] * this.grid.ClientSize.Width);
            //					}
            //					e.Handled = true;
            //					break;
            case GridColSizeBehavior.EqualProportional:
                if (e.Index == this.grid.Model.ColCount)
                {
                    e.Size = this.grid.ClientSize.Width - this.grid.Model.ColWidths.GetTotal(0, this.grid.Model.ColCount - 1);
                }
                else
                {
                    e.Size = (int)(this.colRatios[e.Index] * this.grid.ClientSize.Width);
                }
                e.Handled = true;

                break;

            default:
                break;
            }
        }
예제 #8
0
 void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e)
 {
     if (e.Index == 4)
     {
         e.Size = 150;
     }
     if (e.Index == 3)
     {
         e.Size = 200;
     }
     if (e.Index == 2)
     {
         e.Size = 100;
     }
     if (e.Index == 7 && size_changed)
     {
         e.Size += change_size + 12;
     }
 }
예제 #9
0
 void gridControl1_QueryColWidth(object sender, GridRowColSizeEventArgs e)
 {
     e.Size    = this.gridControl1.ClientSize.Width / 8;
     e.Handled = true;
 }
예제 #10
0
 void gridControl1_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
 {
     e.Size    = (this.gridControl1.ClientSize.Height / 11);
     e.Handled = true;
 }