PB can be used in the form of data window, easy and convenient way to obtain database data, and can also be a visual form of editing. Here we first describe how to create a data window grid and how to use the Created Data window. Create Data Window before creating a grid, it is necessary to ensure that the Database Management window has the required database connection, otherwise it will fail to read the database. Create a grid
Need to create a new Grid,file--new--datawindow--grid first
Select Query Method
Created will prompt the user to choose the data source to obtain the form, here uses the Quick Select (Fast query), later the blog will supplement the choice form the difference.
Select Action Table
Next you will select the data source you want to select, that is, select the desired table (this form can only pick one table for query operation)
Select Action Column
Then continue to select the required column data
Next is the display format settings, generally no special requirements can be skipped, and functional implementation is irrelevant.
Data Window Diagram
Finally, the interface shown below, you can not return here, so consider the creation again, otherwise you can only re-create a new implementation of your requirements.
Modify the Display
You can then make partial property settings for specific table display scenarios, such as header settings, data alignment, font size, and so on.
The modification results are as follows
Save Data Window
If you do not change it, save it.
View Data Window
This will allow you to see the data window in the left-hand directory.
Then, how to make the data window data can be displayed. Then you need to add a Table control to the window and bind it to display the data. Insert Table
Bind Data Window
Select a data source
Binding Results
Add data Fill code
Note that without this code, there will be no data in the table except for the table header, so don't forget this for your attentive little friends.
There is no problem after we save the window and then run the test under the check. Save Window
Normal Display Results
Note: Exception display
1, the database is not connected, it will report an exception
2. If the data source is not matched, no data will be displayed
3. If the code with write fill data is provided, no data will be queried in the table.
I'll see you later. Another kind of data window freeform, interested friends can pay more attention to OH.