You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Overview

The integration of interactive buttons within DataGrid rows is a valuable aspect of the FactoryStudio, enhancing user interface design and functionality. This process allows for a dynamic and intuitive navigation system within an application, with each button serving as a gateway to different displays.


On this page:


Integrating Buttons to a DataGrid

This process involves integrating buttons within a DataGrid, an effective tool for displaying, editing, and sorting tabular data. A custom column is created for these buttons, with each row housing a unique button.

In our specific example, we illustrate a DataGridWindow with a column dedicated to buttons. The concept here is to enable each row of the DataGrid to have a button that, when clicked, redirects the user to a different display.

The steps include creating a Button type column, instantiating Button objects, assigning click events to these buttons, and adding text to the buttons. Finally, the instantiated buttons are assigned to the record's Button-type column.

One crucial aspect of this setup is to ensure that any click events associated with the buttons are appropriately removed when the display is closed. This action ensures resources are efficiently managed, preventing potential memory leaks.


Tutorial

Creation of Buttons in DataGrids with direction to other displays



In summary, you should create a column of type Button (line 12), instantiate objects of type Button (lines 2 and 3), add the click event to the button (lines 14 and 24), add text to the button (lines 15 and 25), and finally, assign the instantiated button to the Button-type column of the record (lines 21 and 31).

The click events are defined in the methods below:

You should also define the removal of the click events added to the buttons when closing the display, as in the following code:

The generated table contains the last column with buttons that direct to different displays, as shown in the image:



In this section...

The root page @parent could not be found in space v10.

  • No labels