±ÍÇÏ´Â ¼Õ´Ô À̽ʴϴÙ
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ
  
  µ¨¸¶´ç °ø½Ä ÀºÇà°èÁÂ
  ÇϳªÀºÇà 227-910235-83607
  ¿¹±ÝÁÖ ÀÌ»ó±¹(¿î¿µÁø)
ÇÁ·ÎÁ§Æ® °Ô½ÃÆÇ
ÅõÇ¥°Ô½ÃÆÇ
µ¨¸¶´ç¼Ò°³
±âÃʺÎÅÍ È°¿ë±îÁö! µ¨ÆÄÀÌ ±³À° - µ¥ºê±â¾î
°­ÁÂ, ÆÁ, Á¤º¸ °­ÁÂ, ÆÁ, Á¤º¸ ÀÔ´Ï´Ù.
±Û³»¿ë - °­ÁÂ, ÆÁ, Á¤º¸
 DevExpress ÄöÅұ׸®µå UDF - cxGrid ¼³Á¤ ÃʱâÈ­ v1.1
¹ø°³
(¼­Å¿í)
2016-01-28 ¿ÀÈÄ 1:36:19
Ä«Å×°í¸®: ÆÁ
3571ȸ Á¶È¸



µî·ÏµÈ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
ÇÁ·ÎÁ§Æ®¿¡ ±×¸®µå ¼Ó¼ºÀ» ÀÏ°ýÀû¿ëÇϱâ À§ÇØ ÇÔ¼ö·Î Á¤¸®Çß½À´Ï´Ù.
ÇÊÅ͹®ÀÚ ÆÛ¼¾Æ®, ¾ð´õ¹Ù¸¦ *, ?·Î ÁöÁ¤Çß½À´Ï´Ù.
Æû»ý¼º ºÎºÐ¿¡¼­ xSetGrid(±×¸®µå¸í)ÇϽø頸ðµç Å×À̺íºä¸¦ ¼³Á¤ÇÕ´Ï´Ù(Çѹ濡)

procedure xSetGrid(const pGrid: TcxGrid;
                          const pFilterCombo: Boolean = True; // ÇÊÅÍÄÞº¸ Àû¿ë¿©ºÎ
                          const pFilterRow: Boolean = False); // ÇÊÅÍÀԷ Àû¿ë¿©ºÎ
// ±×¸®µå »çÀü¼³Á¤°ªÀ» ÇÁ·ÎÁ§Æ® ÀÏ·üÀûÀ¸·Î ¼³Á¤
  procedure SetTableView(const pGridTV: TcxGridTableView);
  const
    iHeaderHeight = 22; 
    iDataRowHeight = 22; // ±âº»°ª 0(17)
  var
    i: Integer;
  begin
    with pGridTV do begin
      BeginUpdate;
      with DataController do begin
        Filter.PercentWildcard := '*';
        Filter.UnderscoreWildcard := '?';
      end;
      FilterBox.Visible := fvNever;
      Filtering.ColumnPopup.MaxDropDownItemCount := 31;
      with FilterRow do begin
        ApplyChanges := fracImmediately;
        SeparatorWidth := 2;

        if False { pFilterRow } then begin
          Visible := not DataController.IsDetailMode;
        end
        else Visible := False;
      end;

      if pFilterCombo then begin
        OptionsCustomize.ColumnFiltering := not DataController.IsDetailMode;
      end
      else OptionsCustomize.ColumnFiltering := False;

      if pGridTV is TcxGridBandedTableView then begin
        with TcxGridBandedTableView(pGridTV) do begin
          OptionsView.BandHeaderHeight := iHeaderHeight;
          OptionsCustomize.ColumnVertSizing := False;
        end;
      end;

      OptionsSelection.CellSelect := False; // ¼¿¼±Åÿ©ºÎ

      with OptionsView do begin
        DataRowHeight := iDataRowHeight;
        HeaderHeight := iHeaderHeight;
        GridLineColor := $00E4E4E4;
        GridLines := cxGraphics.glBoth; // glNone
        GroupByBox := False;
        GroupRowHeight := iHeaderHeight;
        GroupSummaryLayout := gslAlignWithColumns;
        HeaderFilterButtonShowMode := fbmButton;
        ShowColumnFilterButtons := sfbAlways; // sfbWhenSelected;
      end;

      for i := 0 to ColumnCount - 1 do begin
        if OptionsView.Footer then begin
          Columns[i].FooterAlignmentHorz := taRightJustify;
        end;

        Columns[i].HeaderAlignmentHorz := taCenter;
        Columns[i].HeaderAlignmentVert := cxClasses.vaCenter; // Default

        if (Columns[i].Properties = nil) then begin
          Columns[i].PropertiesClass := TcxLabelProperties;
        end;

        if (Columns[i].PropertiesClass = TcxLabelProperties) then begin
          Columns[i].Properties.Alignment.Vert := taVCenter;
          Columns[i].Properties.Alignment.Horz := taLeftJustify;
        end
        else if (Columns[i].PropertiesClass = TcxTextEditProperties) then begin
          Columns[i].Properties.Alignment.Vert := taVCenter; // Default
        end
        else if (Columns[i].PropertiesClass = TcxButtonEditProperties) then begin
          Columns[i].Options.Filtering := False;
          Columns[i].Options.ShowEditButtons := isebAlways;
          Columns[i].Options.Sorting := False;
        end
        else if (Columns[i].PropertiesClass = TcxImageComboBoxProperties) then begin
          Columns[i].Properties.Alignment.Horz := taCenter;
          TcxImageComboBoxProperties(Columns[i].Properties).DropDownRows := 31;
          TcxImageComboBoxProperties(Columns[i].Properties).ImmediatePost := True;
        end
        else if (Columns[i].PropertiesClass = TcxCheckBoxProperties) then begin
          TcxCheckBoxProperties(Columns[i].Properties).ImmediatePost := True;
          TcxCheckBoxProperties(Columns[i].Properties).NullStyle := nssUnchecked;
          TcxCheckBoxProperties(Columns[i].Properties).ValueChecked := True;
          TcxCheckBoxProperties(Columns[i].Properties).ValueUnchecked := False;
          with Columns[i], Options do begin
            HeaderAlignmentHorz := taCenter;
          end
        end
        else if (Columns[i].PropertiesClass = TcxDateEditProperties) then begin // cxCalendar
          TcxDateEditProperties(Columns[i].Properties).ImmediatePost := True;
          TcxDateEditProperties(Columns[i].Properties).InputKind := ikRegExpr;
          if Columns[i].Tag = 0 then begin
            TcxDateEditProperties(Columns[i].Properties).DateButtons := [btnToday];
          end;
        end;
      end;
      EndUpdate;
    end;

  end;

var i: Integer;
begin
    with pGrid do begin
        BevelEdges := [beTop, beBottom];
        BevelInner := bvRaised;
        BevelKind := bkFlat;
        BevelOuter := bvNone;
        BorderStyle := cxControls.cxcbsNone;

        for i := 0 to ViewCount - 1 do begin
            if (views[i] is TcxGridTableView) or
                (views[i] is TcxGridBandedTableView) then begin
                SetTableView(TcxGridTableView(Views[i]));
            end;
        end;
    end;
end;