Home > database >  PB data window and is used to transfer data between the data window
PB data window and is used to transfer data between the data window

Time:10-10

grid style is used to transfer data between data window and window

grid style data window to another window (format style, data), with what method to realize,,??
Best can spread to compound style inside the child window,,,, consult?? ,,
I want to do is use the print preview... Consult with what method the.. ????

CodePudding user response:

Sharedata or rowscopy functions like, very simple and can achieve

CodePudding user response:

RowsCopy ()
Function: a data window control specified in the data line to another window, or the data window control in
A buffer specified line to another buffer,
Grammar:
Dwcontrol. RowsCopy (while the startrow, endrow copybuffer, targetdw, beforerow, targetbuffer)
Parameters: dwcontrol data window control name
While the startrow long specified to copy the data rows starting line number
Endrow long specified to duplicate data rows to end the line number
Copybuffer dwBuffer enumerated types, copy in the specified buffer from which, effective value for the
Primary! The main buffer
Delete!!! Delete the buffer
The Filter! The filter buffer


Targetdw: the purpose of to copy data to the data window name targetdw can be with dwcontrol
The same data window control, also can be a different data window control,
Beforerow: long, specify the replicated data in front of the line which is inserted into the line if you want to insert data
Into the last line of use is greater than the purpose behind the data window in any number of rows,
Targetbuffer: dwBuffer enumerated types specify the replicated data is placed into the objective data window controls
Which buffer valid values for
Primary! The main buffer
Delete!!! Delete the buffer
The Filter! The filter buffer
Return values: an Integer function returns 1 on success when an error occurs when the return 1 if any parameter has a value of
NULL, RowsCopy () function returns NULL,
Usage: use RowsCopy () function copy some lines to the objective data window control main buffer after the
The change status to NewModified! , if the application USES the Update () function to Update data window
Controls the corresponding table so original concept to the newly inserted row generating SQL INSERT statement and the SQL
The INSERT statement sent to the database management system,
Use RowsCopy () function to replicate data row data for objective data window controls drop-down window style
Data in a column does not automatically retrieved application purpose these columns in the data window need to be clearly perform
Retrieve () function,
RowsCopy () function is typically used for:
1 copy one or more rows of data users according to the existing data to generate new data,
2 copy some lines in a data window to another window and then print the second data window
Example 1: the following code in the data window dw_1 all current line after line is copied to the second data window
Dw_2 Lord buffer starting position:
Dw_1. Rowscopy (dw_1. Getrow (), dw_! Rowcount (), primary! Dw_2, 1, primary!)
Example 2: the following code in the data window dw_1 all current line after line is copied to the state_id listed in the dropdown
Master buffer of data window starting position:
Datawindowchild DWC
Dw_3. Getchild (" state_id, "DWC)
Dw_1. Rowcopy (dw_1. Getrow (), dw_1, rowcount (), primary! DWC, 1, primary!)
Example 3: the following code in the data window dw_1 all current line after line is copied to the nested statements
D_employee Lord buffer starting position:
Datawindowchild DWC
Dw_composite. Getchild (" d_emplayee, "DWC)
Dw_1. Rowscopy (dw_1. Getrow (), dw_1, rowcount (), primary! DWC, primary!)

CodePudding user response:

Original concept to realize data sharing is through function ShareData () implementation, ShareData function of grammar to dwprimary ShareData (dwsecondary). Among them, the dwprimary refers to the main data window control name to dwsecondary refers to from the data window control, the function of the return value is an Integer type, the function returns 1, on success errors when summer and winter vacations back - 1.
To realize data sharing three conditions are as follows:
1, select the number of fields is the same;
2, select the data type of the field;
3, choose the order of the fields is the same;
Concrete steps to realize data sharing is as follows:
1, the establishment of a number of data window object, and allow them to manipulate the same table at the same time, also asked the columns of the main data window and from the data window object must be the same, but their use a select statement can be different,
2, to build a data window and in the data window to create several widgets, they specify the corresponding data window object, respectively,
3, select one of the data window control as the main data window control, the rest is from the data window control, writing the code in the master data window open event, with ShareData () function to achieve the sharing, data buffer master-slave data window
To end the data sharing between the data window, you can call ShareDataOff () function, after termination of the data sharing, from the data in the data window will disappear, to be sure, in most cases you can don't have to close the data sharing, because when a window is closed or any related to data sharing Datawindow controls to be deleted, data sharing would automatically shut off,

CodePudding user response:

GetFullState
SetFullState

CodePudding user response:

reference 4 floor acen_chen response:
GetFullState
SetFullState

Positive solution

CodePudding user response:

Sharedata, simple
  • Related