티스토리 뷰
728x90
- Query 실행후 동적으로 컬럼 추가
(cxGridDBTableView1.DataController as IcxCustomGridDataController).DeleteAllItems;
(cxGridDBTableView1.DataController as IcxCustomGridDataController).CreateAllItems(true);
cxGridDBTableView1.ApplyBestFit();
- [Enter] 키로 Cell 이동
cxGrid1TableView1.OptionsBehavior.FocusCellOnCycle := true;
cxGrid1TableView1.OptionsBehavior.FocusCellOnTab := true;
cxGrid1TableView1.OptionsBehavior.FocusFirstCellOnNewRecord := true;
cxGrid1TableView1.OptionsBehavior.GoToNextCellOnEnter := true;
- 속성
속성명 | 자료형 | 설명 |
OptionsBehavior.CopyCaptionsToClipboard | Boolean | 클립보드에 복사할 때 캡션도 복사할지 여부 |
OptionsSelection.CellMultiSelect | Boolean | Cell 다중 선택 여부 |
OptionsSelection.CellSelect | Boolean | Cell별로 선택 가능 여부 |
OptionsSelection.MultiSelect | Boolean | Row 다중 선택 여부 |
- TcxCustomDataSource
TDatasetFieldModel=class(TcxCustomDataSource) private DatasetAnalyzer : TDatasetAnalyzer; protected function GetRecordCount: Integer; override; function GetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Variant; override; public constructor Create; destructor Destroy; override; end; implementation { TDatasetFieldModel } constructor TDatasetFieldModel.Create; begin inherited Create; DatasetAnalyzer := TDatasetAnalyzer.Create(TDatasetField); end; destructor TDatasetFieldModel.Destroy; begin DatasetAnalyzer.Free; inherited Destroy; end; function TDatasetFieldModel.GetRecordCount: Integer; begin Result := DatasetAnalyzer.Count; end; function TDatasetFieldModel.GetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Variant; var AColumnId: Integer; theField : TDatasetField; begin result := Variants.Null; AColumnId := GetDefaultItemID(Integer(AItemHandle)); if Integer(ARecordHandle) < Self.GetRecordCount then begin theField := (DatasetAnalyzer.Items[Integer(ARecordHandle)] as TDatasetField); if Assigned(theField) then begin case AColumnId of 0 : Result := theField.FieldName; 1 : Result := theField.DataTypeStr; 2 : Result := theField.Size; end; end; end; end; { TForm1 } procedure TForm1.Button1Click(Sender: TObject); begin DatasetFieldModel := TDatasetFieldModel.Create; cxGrid1TableView1.DataController.CustomDataSource := DatasetFieldModel; end; procedure TForm1.ListBox1Click(Sender: TObject); begin if ListBox1.ItemIndex >= 0 then begin Table1.Active := false; Table1.TableName := ListBox1.Items.Strings[ListBox1.ItemIndex]; Table1.Active := true; DatasetFieldModel.DatasetAnalyzer.Analyzer(Table1); DatasetFieldModel.DataChanged; end; end;
- 한글관련 버그 수정 (Delphi 2009 이상
사이트 : http://eaglesoft.tistory.com/162
- 옵션
cxGrid1TableView1.OptionsView.GroupByBox := false; cxGrid1TableView1.OptionsData.Editing := false; // 읽기전용
- ??
procedure TCreateTableFrm.Col1GetProperties( Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AProperties: TcxCustomEditProperties); var rowData : TRowObject; begin rowData := TRowObject(CustomGridModel.RowDataList.Items[ARecord.Index]); ... end;
- 수정중인 Cell 바로 적용
cxGrid1TableView1.DataController.PostEditingData;
- end -
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 일본여행
- SAS
- ffmpeg
- Spring
- 튜닝쇼 2008
- flex
- ble
- 전예희
- Xcode
- 레이싱모델 익스트림 포토 페스티벌
- android
- Delphi
- ubuntu
- NDK
- 서울오토살롱
- Mac
- Spring MVC
- Delphi Tip
- Linux
- 송주경
- 동경
- JavaScript
- oracle
- BPI-M4
- MySQL
- koba2010
- KOBA
- sas2009
- Java
- 지스타2007
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함