Data Binding

Selecting & Placing Dataset Object Icon from Toolbar

1

Select the Dataset object from the component toolbar. Hovering over the component icon displays the component name as a tooltip.

When the Dataset object is selected in the component toolbar, the mouse pointer changes to the Dataset object icon in the design screen.

2

Click the mouse anywhere on the design screen. Since the Dataset object is not displayed on the screen, the location where it is placed has no meaning. When you click the mouse, the Dataset object is added to the [Invisible Object] area.

Running Dataset Editor

A tool to specify the data and data column format to be processed in the Dataset object is provided. You can create appropriate columns and add data by running Dataset Editor.

1

Double-click the Dataset object in the [Invisible Object] area.

2

[Dataset Editor] is executed on the left side of the property window. When not in use, click the [x] button on the right to close the window. [Dataset Editor] displays the window again by double-clicking the Dataset object or selecting the menu [View > Dataset Editor].

Adding Column to Dataset Object

In order to include data in the Dataset object, you need to set the information on what data to include. This is called a column and you can add the column in the Dataset Editor.

1

Double-click the Dataset object in the [Invisible Object] area.

2

[Dataset Editor] is executed on the left side of the property window. Click the Add Colum icon in the [Columns] item in the middle of [Dataset Editor].

3

A new column is added to the [Columns] item. Related property values (id, type, size, etc.) can be modified after clicking the corresponding cell with the mouse.

4

Add 2 columns and change the id values to "code", "item". When you add the column, you can see that the added column information is displayed in the [Rows] item below.

Adding Data to Dataset Object

Once the column information is created, you can add data.

1

Double-click the Dataset object in the [Invisible Object] area.

2

[Dataset Editor] is executed on the left side of the property window. Click the Add Data icon in the [Rows] item under [Dataset Editor].

3

When data is added, click the corresponding cell with the mouse to enter the desired value.

Binding Dataset Object to Grid Component

Binding the component and the Dataset object means that you are connecting to share data. If the data of the Dataset object is added or changed in the bound state, then the data displayed in the component is also changed. Conversely, when data is added, deleted, or changed in the component, the data of the Dataset object is also changed.

1

Place the Grid component on the design screen.

2

Click the left mouse button to select the Dataset object in the [Invisible Object] area and drag it onto the Grid component on the design screen.

3

Data binding is processed automatically when you release the left mouse button that was held on the Grid component. In the Grid component where nothing was displayed, column information and data set in the Dataset object are displayed.

4

Save the changed content and select the [QuickView] item in the toolbar. The Grid component is displayed on the screen as the Nexacro browser is executed and the bound data can also be checked.

Binding Dataset Object to Edit Component

In the case of the Grid component, column information and data of the Dataset object are all displayed in a table format. However, if only one piece of data can be displayed like the Edit component, what information of the bound Dataset object can be displayed? Although it is not visible on the screen, it has the selected row information inside the Dataset object, and in the case of the Edit component, the desired column information from the selected row is selected and displayed.

1

Place the Edit component on the design screen.

2

Click the left mouse button to select the Dataset object in the [Invisible Object] area and drag it onto the Edit component on the design screen.

3

The [Bind Item] setting window is displayed when you release the left mouse button that was held on the Edit component. In the [Bind Item] setting window, select the property to be bound in the Edit component and the column to be bound in the Dataset object.

The Edit component does not display the bound value on the Nexacro Studio design screen. The value is displayed according to the selected row information when the application is executed.

4

Save the changed content and select the [QuickView] item in the toolbar. The Edit component is displayed on the screen as the Nexacro browser is executed and the bound value can be checked. As the row information has not been touched, the first row data "Toy" is displayed.

Binding Dataset Object to Grid Component & Edit Component

When binding the Dataset component to the Edit component, the displayed data differs according to the row information. This time, the same Dataset object is bound to the Grid component and the Edit component. Each time the row of the Grid component is selected, the value displayed in the Edit component differs here.

For how to bind the Dataset object to the Grid component and the Edit component, please refer to the previous examples.

Binding Dataset Object to Grid Component

Binding Dataset Object to Edit Component

1

Place the Grid component and the Edit component on the design screen.

2

Select the Dataset object and bind it to the Grid component and the Edit component.

3

Save the changed content and select the [QuickView] item in the toolbar. The Grid component and the Edit component are displayed on the screen as the Nexacro browser is executed and the bound value can be checked. As the row information has not been touched, the first row is selected and "Toy" is displayed in the Edit component.

4

Click the second row of the Grid component with the mouse. You can see that the value of the Edit component is different. If you select the first row again, the value of the Edit component will be different.