Beruflich Dokumente
Kultur Dokumente
Function and cxGrid1Level1 the right cxGrid1DBTableView1 of DBGrid equivalent. Right-click cxGrid1 can add a cxGrid1Level2 r
cxGrid1Level2 can choose the Create View, Add level or Delete Level. The Add level can increase sub-Level, Create View
Query function;
Some use:
1) the pictures and MEMO example:
Dragged into a cxGrid1, Table1, DataSource1. The Table1 DatabaseName is set to DBDEMOS TableName Set biolife.db,
To set to DataSource1 Create All Columns; double-click cxGrid1, in the pop-up window; right-click cxGrid1DBTableView1 selecti
cxGrid1DBTableView1Notes, and cxGrid1DBTableView1Graphic, they Properties property is set to BlobEdit; look at the operatio
Results. Then cxGrid1DBTableView1Graphic Properties property is set to Image, and then Properties Stretch is set to True,
2) how to make "Drag a column here to group by that column" does not show
Solution: Click cxGrid1 cxGrid1DBTableView1
= False to Note: in cxGrid1DBTableView1-> optionsview-> groupbybox: the inside the OptionsView many properties may often
English of of 3) GroupPanel above [Drag a column header to group by that column] how can be changed to Chinese?
Solution: The easiest way is TcxGridTableView.OnCustomDrawPartBackground availability OnCustomDrawGroupCell:
5) statistical functions
Solution: cxGrid1DBTableView1-> optionsview-> Footer set to True
cxGrid1DBTableView1-& gtataController-> Summary set FooterSummaryItems can
To be continued. . . . . . . . .
These are some of the problems encountered with cxGrid time, I summed up the part, there are many issues to address. Here
8) How to achieve, such as Excel, grid = G14 + G15 + G16 this function
Solution: To give a simple example: Label1.Caption: = cxGrid1DBTableView1.DataController.Values ??[2,
9) right click cxGrid1DBBandedTableView1 menu the Edit Layout what is the use, how to use?
Solution: You can drag the field, side by side can be dragged into layering (layers), drag the arrow will show, that can drag a field
To the uppermost, you can make the the recording Click packet field. Click one of the fields above there will be a small triangle
The role of the small triangle in the operational phase, the data will be in accordance with this field rise or fall sort.
There is also a Set as Default role is to keep the current TableView parameters, under this new TableView will be the last remai
10) How the cxGrid data import to EXCEL, HTML, XML and TEXT
Solution: This problem is easier than ever with cxGrid
uses
cxExportGrid4Link;
var
ARecords, AValues: TStringList;
I: Integer;
ARecords: = TStringList.Create;
AValues: = TStringList.Create;
with ARecords do
try
LoadFromFile (AFileName);
cxGrid1TableView2.BeginUpdate;
cxGrid1TableView2.DataController.RecordCount: = Count - AHeaderLineCount;
for I: = 0 to Count - (AHeaderLineCount + 1) do
InitRecord (Strings [I + AHeaderLineCount]);
finally
cxGrid1TableView2.EndUpdate;
ARecords.Free;
AValues.Free;
end;
end;
The assets line times the number at the beginning of the end of the number of liabilities and owner's equity line number at the
-------------------------------------------------- -------
Current assets: Current liabilities: 1 0.00 0.00 2 0.00 0.00
15) How to move the cursor, the corresponding text of the cell to change color?
Solution:
var
FTrackItem: TcxCustomGridTableItem;
FTrackRec: TcxCustomGridRecord;
17) from the table structure, the main point to open the "+" how the focus on the corresponding master table records?
Solution:
var
HitTest: TcxCustomGridHitTest;
Code:
The ExportGrid4ToExcel (AppRootDir + 'production plan instruction', grdWorkOrder True, True, True, 'xls');
try
ShellExecute (handle, nil, PChar (AppRootDir + 'production plan instruction XLS'), nil, nil, SW_SHOWNORMAL);
except
ShowMessage ('The machine is not installed EXCEL, this function must EXCEL installed on your computer in order to run!');
Abort;
end;
If you want to the exported fonts and colors, and grid use TcxStyleRepository control, build a TcxStyle, set the color and font, th
Will be able to know why to assigned to AStyle can the TcxStyleRepository a boy child!
FocusedRecordIndex: = VOldFocusedRecordIndex;
end;
FocusedRecordIndex: = VOldFocusedRecordIndex;
end;
The calls the TableView The DataController.Groups.FullExpand method expand all nodes
Use a custom data source, delete records, BeginUpdate, processed and then the EndUpdate, otherwise it will occasionally thro
tvProducePlan.BeginUpdate;
try
FCustomDataSource.DeleteSelectedRecord (GetSelectedIds);
finally
tvProducePlan.EndUpdate;
end;
Get the value of a column of the record selected:
function TMainForm.GetSelectedIds: TStringArray;
var
VIndex: Integer;
begin
SetLength (Result tvProducePlan.Controller.SelectedRowCount,);
for VIndex: = 0 to tvProducePlan.Controller.SelectedRowCount - 1 do
Result [VIndex]: = tvProducePlan.DataController.Values ??[tvProducePlan.Controller.SelectedRecords [VIndex]. RecordIndex, 0]
end;
Another grid based on a grid of data positioning:
procedure TMainForm.LinkFocusRecord (AParentColumn, AChildColumn: TcxGridColumn; AParentGrid, AChildGrid: TcxGridTab
var
VIndex: Integer;
VValue: String;
FocusedRecord: TcxGridFocusedRecordChangedEvent;
begin
FocusedRecord: = AParentGrid.OnFocusedRecordChanged;
AParentGrid.OnFocusedRecordChanged: = nil;
try
with AChildGrid.DataController do
begin
VValue: = GetDisplayText (FocusedRecordIndex, AChildColumn.Index);
end;
AParentGrid.DataController.FocusedRecordIndex: = VIndex;
AParentGrid.DataController.SyncSelectionFocusedRecord;
finally
AParentGrid.OnFocusedRecordChanged: = FocusedRecord;
end;
end;
The TableView FocusedRecordChanged event indicates the current focused recording change the use TcxGridTableView.Contro
Relate
nt of personnel files;
iew many properties may often use, such as: ColumnAutoWith Navigator, etc., slowly pondering.
e changed to Chinese?
ustomDrawGroupCell:
ote: other places to set the main table structure as the display is not, such as setting the table from the Table or Query mastersource
then the appropriate settings cxGrid1Level1 and cxGrid1Level2 the Caption value.
re many issues to address. Here I would like to used cxGrid of people helped to summarize, let scholars less detours!
HOWNORMAL);
cxStyle, set the color and font, this assign a TcxStyle to Content the property of TcxGridDBTableView Styles and Header on OK.
Modify the properties of the TableView, OptionsSelection-> HideSelection set to False
therwise it will occasionally throw index out of range:
Properties set the select field for the CheckBox. ReadOnly = False;
NullStyle = nssUnchecked
This article comes from programmershare.com blog, reproduced, please indicate the source:
box, remove cxgrid station head = false; at the tableview1 ptionsview groupbybox,
2 In the Grid footer SUM (column) tableview1 optionsviewfooter =-ture
Then a summary of footer.add in cxGRid1 customize .. total column kind = skSum
3 to remove cxgrid filter drop-down arrow to select tableview1.optionscustomize.columnfiltering = fasle;
The 4. CxGrid1DBTableView1 OptionView the property GroupFooters to gfAlwaysVisible and set the need to sum a column, add
You can achieve the desired function
Dev Express Lane cxGrid default numeric format with how to remove ah!
6. Double-click cxGrid, colmnum change the type options.properties.Memo
7 set in displayformat
The use cxGrid some time to summarize here some of the ways to use cxGrid, I hope some help to people just getting started w
Brief introduction: cxGrid the bottom right cxGrid1Level1 is the Grid table layer a multi-cxGrid, which is equivalent to a collectio
Function and cxGrid1Level1 the right cxGrid1DBTableView1 of DBGrid equivalent. Right-click cxGrid1 can add a cxGrid1Level2 r
cxGrid1Level2 can choose the Create View, Add level or Delete Level. The Add level can increase sub-Level, Create View
Query function;
2) DB Banded Table can be achieved, for example:
---------------------------------
|1|2|
---------------------------------
| Field | Field | Field | Field |
And other similar functions;
3) DB Card View provides the functionality of the card by the display data, such as management of personnel files;
4) Other enumerate.
Some use:
1) the pictures and MEMO example:
Dragged into a cxGrid1, Table1, DataSource1. The Table1 DatabaseName is set to DBDEMOS TableName Set biolife.db,
Active is set to True; the DataSource1 DataSet to DataSource Table1; the cxGrid1DBTableView1 DataController,
To set to DataSource1 Create All Columns; double-click cxGrid1, in the pop-up window; right-click cxGrid1DBTableView1 selecti
cxGrid1DBTableView1Notes, and cxGrid1DBTableView1Graphic, they Properties property is set to BlobEdit; look at the operatio
Results. Then cxGrid1DBTableView1Graphic Properties property is set to Image, and then Properties Stretch is set to True,
The cxGrid1DBTableView1-> optionsview-> CellAutoHeight is set to True, look at the results.
2) how to make "Drag a column here to group by that column" does not show
Solution: Click cxGrid1 cxGrid1DBTableView1
In cxGrid1DBTableView1-> optionsview-> groupbybox: = false to
Note: OptionsView inside many properties may often use, such as: ColumnAutoWith, Navigator, etc., slowly pondering it :)
English of of 3) GroupPanel above [Drag a column header to group by that column] how can be changed to Chinese?
Solution: The easiest way is TcxGridTableView.OnCustomDrawPartBackground availability OnCustomDrawGroupCell:
5) statistical functions
Solution: cxGrid1DBTableView1-> optionsview-> Footer set to True
cxGrid1DBTableView1-> DataController-> Summary set FooterSummaryItems can
To be continued. . . . . . . . .
8) How to achieve, such as Excel, grid = G14 + G15 + G16 this function
Solution: To give a simple example: Label1.Caption: = cxGrid1DBTableView1.DataController.Values ??[2,
9) right click cxGrid1DBBandedTableView1 menu the Edit Layout what is the use, how to use?
Solution: You can drag the field, side by side can be dragged into layering (layers), drag the arrow will show, that can drag a field
To the uppermost, you can make the the recording Click packet field. Click one of the fields above there will be a small triangle
The role of the small triangle in the operational phase, the data will be in accordance with this field rise or fall sort.
There is also a Set as Default role is to keep the current TableView parameters, under this new TableView will be the last remai
10) How the cxGrid data import to EXCEL, HTML, XML and TEXT
Solution: This problem is easier than ever with cxGrid
uses
cxExportGrid4Link;
var
ARecords, AValues: TStringList;
I: Integer;
begin
if not FileExists (AFileName) then
raise Exception.Create ('Data file not found');
ARecords: = TStringList.Create;
AValues: = TStringList.Create;
with ARecords do
try
LoadFromFile (AFileName);
cxGrid1TableView2.BeginUpdate;
cxGrid1TableView2.DataController.RecordCount: = Count - AHeaderLineCount;
for I: = 0 to Count - (AHeaderLineCount + 1) do
InitRecord (Strings [I + AHeaderLineCount]);
finally
cxGrid1TableView2.EndUpdate;
ARecords.Free;
AValues.Free;
end;
end;
15) How to make the mouse to move the text color in the corresponding unit?
Solution:
var
FTrackItem: TcxCustomGridTableItem;
FTrackRec: TcxCustomGridRecord;
16) in cxgrid in dxdbgrid ExpressQuantumGrid 3.2.2 and 4.2 versions What is the difference?
There is a big difference, basically the equivalent of two controls.
The, so cxgrid does not support dxdbgrid cxgrid is a complete rewrite of the in dxdbgrid based on
So cxgrid which specifically provides a will dxdbgrid to import to cxgrid function.
18) from the table structure, the main point to open the "+" how the focus on the corresponding master table records?
Solution:
var
HitTest: TcxCustomGridHitTest;
Solution:
var
A: TDataSource:
B: TcxlookupcomboboxProperties;
begin
A: = TDataSource.create (self);
B: = tcxlookupcomboboxproperties.create to (self);
A.Dataset: = Dic_ry_xb ;/ / here the specified data source.
b.listdource: = A ;/ / here the specified field listsource property.
b.keyfieldnames: = 'a'; / / here the key fields of the specified field
b.listfieldnames: = 'b'; / / specified herein the return value of the field.
b.listcolumns.items [0]. caption: = 'x; / / default here is to build a field, but the header is the name, so here it noon want.
cxGrid1DBTableView1c1_sex_code.Properties: = b; / / specified herein that field.
end; / / This is the initialization code,
2004-1-7 14:05:14 Question 21
21) ExpressQuantumGrid4.5 finished package where you can download ExpressQuantumGrid4.5 the finished package, coverin
et the need to sum a column, add Add summary.default for Groups total field fieldname column under Display Statistics field, the format fo
nt of personnel files;
1 DataController,
e changed to Chinese?
ustomDrawGroupCell:
.5 the finished package, covering the files directly to the source file on it.
lay Statistics field, the format for format, kind of statistical methods, position for the seat spfooter below the packet, spgroup in the top of
dedTableView1-> OptionsView-> Navigator set for True. Then right-click cxGrid1DBBandedTableView1, inside the pop-up menu bar, click Se
DBBandedTableView1 menu can also drag and drop.
he packet, spgroup in the top of the packet or with cxGridPopupMenu1, at run-time for any type of digital sum a column, simply set cxGrid
de the pop-up menu bar, click Set as default.
sum a column, simply set cxGridPopupMenu1 property Grid for cxGrid1DBTableView1 cxGrid
I would do something like this
for I := 0 to YourGrid.bands.count-1
YourGrid.bands[I].Free;
for I := 0 to YourGrid.ColumnCount - 1 do
begin
if (YourGrid.Columns[I].Caption = 'prim_key') then
YourGrid.Columns[I].Position.BandIndex := 0
end;
To obtain properties of the current PopupEdit editor that are currently in effect, use the ActiveProperties property:
To obtain properties of the current PopupEdit editor that are currently in effect, use the ActiveProperties property:
Tags:
Hi,
Can you please look at the attached demo, it is the same demo of last weeks question.
As you can see i perform a
[Delphi]
TcxPopupEditProperties(edt_zoekpatient.Properties).PopupControl.Visible := False;
on curchange of the component, but that doesn't do the trick, the popupcontainer is still showing when the edititem text is em
thanks!
Leave a Comment
1Solution
Hello Franky,
I think that it is much more convenient to use the edt_zoekpatient.Properties.OnChange event or similar events of the Properti
or similar events of the Properties collection. The benefit is that in this event you have the Sender parameter that is an in-place editor cre
iew1Col1, foLike,
ter that is an in-place editor created based on the Properties class you are using. For example, for the TcxPopupEditProperties properties c
opupEditProperties properties class an in-place TcxPopupEdit editor is created. This means that you can use the DroppedDown property to
e the DroppedDown property to control your editor's DropDown window:
Howtosetupanunbounditeminadata-awareView
The new ExpressQuantumGrid 5 supports this functionality and allows you to set such an unbound column (row - for a Card Vi
Here are the necessary steps (the code snippets will illustrate how to perform the same operations programmatically):
1. IMPORTANT. This feature requires the Data Controller to be in the following settings:
- default data loading mode - make sure to set the Data Controller's DataModeController.GridMode property to False
- Smart Refresh mode - set the Data Controller's DataModeController.SmartRefresh property to True
- key field(s) - you must initialize the Data Controller's KeyFieldNames property
aCol: TcxGridDBColumn;
...
aCol := <aView>.CreateColumn;
with aCol do
begin
Name := 'colUnbound';
Caption := 'Check';
end;
3. Set the column's DataBinding.ValueType to an appropriate value. This property specifies the string representation of the dat
[Delphi]Open in popup window
uses
cxDataStorage;
...
aCol.DataBinding.ValueTypeClass := TcxBooleanValueType;
NOTE: When setting the value type programmatically, you should refer to the DataBinding.ValueTypeClass property instead an
4. Bind an appropriate editor to the column. Set the column's Properties property to the necessary value (CheckBox in our inst
cxCheckBox;
...
aCol.PropertiesClass := TcxCheckBoxProperties;
//OR
aCol.PropertiesClassName := 'TcxCheckBoxProperties';
NOTE: When setting the Properties property value programmatically, you should refer to the item's PropertiesClass or Properti
5. Adjust the column Properties' settings as your need dictate. For example, set the ValueChecked and ValueUnchecked prope
begin
AllowGrayed := False;
ValueChecked := True;
ValueUnchecked := False;
end;
ound column (row - for a Card View).
tions programmatically):
e string representation of the data type which the data binding provides. For example, if you wish the column to store logical values, set the
ueTypeClass property instead and use the corresponding value type class.
ssary value (CheckBox in our instance).
em's PropertiesClass or PropertiesClassName property instead and use the corresponding properties type class.
ked and ValueUnchecked properties to the values used in your application:
mn to store logical values, set the DataBinding.ValueType property to Boolean.
Showing cell content on hint in DevExpress grid
I am using TcxGridDBTableView from DevExpress. Some of the cells contain really long strings, so I want to be able to show the
+2 A:
Try this
procedure TForm1.cxGrid1TableView1Column3GetCellHint(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint;
var AHintText: TCaption; var AIsHintMultiLine: Boolean;
var AHintTextRect: TRect);
begin
AHintText := VarToStr(ARecord.Values[Sender.Index]);
AIsHintMultiLine := True;
end;
http://www.devexpress.com/Support/Center/p/B133087.aspx