Skip to content

Data Grid

The data grid is the component that displays and inputs tabular data. The data grid consists of a data grid as the main body and data grid columns as column components. Data grid columns can be added/removed at will from the data grid properties.

Tips

Properties

UI Dialog

ItemInput valueOptionDefault value
IDstringautomatic
Header Colorstring
color picker
#f7f7f7
Widthnumber565
Heightnumber230
Xnumber
Ynumber
Header AdjustmentSelect- All
- Header
- Data
- Off
Off
Header Wrapselect- Normal
- Off
Off
Header Font SizeNumber14
Header Heightnumber40
Editableboolean- on
- off
on
One Click Editboolean- on
- off
off
Paginationboolean- on
- off
off
Visibilityboolean- on
- off
on
Export To XlSX Buttonboolean- on
- off
off
Selectselect- ROW
- CELL
- COMPLEX
- NONE
ROW
Add Rowboolean- on
- off
on
Delete Rowboolean- on
- off
on
Footerboolean- on
- off
off
Resizableboolean- on
- off
off
Left Splitnumber0
Page Sizenumber100
Valuetable[details 1]
Page EventSelect- NONE
- ACTION
NONE

Action

ItemPropertiesData TypeOptionsDefault value
IDidstringautomatic
Header ColorheaderColorstring
Widthwidthnumber565
Heightheightnumber230
Xxnumber
Yynumber
Header Adjustment
Header Word WrapheaderWordWrapstring
  • off
  • normal
  • Off
    Header Font SizeheaderFontSizenumber14
    Header HeightheaderRowHeightnumber
    editableboolean- true
    - false
    true
    oneClickEditboolean- true
    - false
    false
    paginationboolean- true
    - false
    false
    visibilityboolean- true
    - false
    true
    exportToXlsxButtonboolean- true
    - false
    false
    selectionstring- row
    - cell
    - complex
    - none
    row
    addButtonboolean- true
    - false
    true
    deleteButtonboolean- true
    - false
    true
    footerboolean- true
    - false
    false
    resizableboolean- true
    - false
    false
    leftSplitnumber0
    pageSizenumber100
    valuearray of object
    pageIndexnumber
    pagePreviousIndexnumber
    totalCountnumber
    selectednumber
    deletedarray of object

    Tips

    [Details 1] Value

    Gets and sets values for the entire table of data grid. The format of the values is an array of objects representing rows. The default status is registered as follows. Register each row from the [Add Row] button. To delete a row, click on the row to be deleted and then click the “Delete Row” button.

    <DatagridID>_month<DatagridID>_companyA<DatagridID>_companyB<DatagridID>_companyC<DatagridID>_companyD
    0220527234
    035339055
    0455308166
    0530116222

    When handling data in an action, data can be displayed on the data grid by setting the value (value) in the form of an array of objects, as shown in the following example. Similarly, the value (value) contains the current display data state of the data grid in the form of an array of objects.

    [{"month":"02","companyA":20,"companyB":52,"companyC":72,"companyD":34,"id":"u1677456694544"},{"month":"03","companyA":5,"companyB":33,"companyC":90,"companyD":55,"id":"u1677456694545"},{"month":"04","companyA":55,"companyB":30,"companyC":81,"companyD":66,"id":"u1677456694546"},{"month":"05","companyA":30,"companyB":11,"companyC":62,"companyD":22,"id":"u1677456694547"}]

    Tips

    [Details 2]When updating from actions outside the data grid

    If you want to collectively update changes in the data grid from an external button without setting an action for each data grid column, the method differs between “Add Row/Update Row” and “Delete Row”.

    For adding or updating rows
    For adding and updating rows, use the value (value) property. It is also possible to set up an action on a datagrid column and send a request to update it each time a cell is edited, but this method will consume fewer requests. Each object of value ($value) represents row data, but it also carries information indicating the identifier (id) and status ($status) of the row data.

    Operation$status value
    row additionadded
    row updateupdated

    Tips

    In case of line deletion
    For row deletion, use the delete value (deleted) property. The deleted value (deleted) property allows you to retrieve the row data where the row deletion took place. Data can be retrieved by specifying something like $ui.data_grid.deleted.

    Tips

    [Details 3]When updating from a datagrid column action

    In a datagrid column action, the row where the event occurs can be retrieved by the selected property. The selection value (selected) is a property that allows you to get the row data that is selected in the data grid. Depending on the column type, datagrid column events can be change events (onchange) or click events (onclick), both of which can be retrieved from the row object via the selected property.

    [Details 4]Classification by data loading and display

    The classification of data loads, characteristics, settings to make each classification and the data grid features available at each classification are described below.

    TypeCharacteristicUI Dialog
    Properties
    Action
    What to set in the initial display and search actions
    Action
    What to set in the page event action
    Data Grid Function
    Sorting
    Data Grid Function
    Filtering
    Data Grid Function
    Cell Editing
    Data Grid Function
    Add Row
    Data Grid Function
    Delete Row
    Examples of usage scenarios
    Bulk LoadingCollect all data and display allPagination: Off
    Page Event: None
    value=All data to be displayed-If you want to add or delete rows
    Pagination (Bulk Loading)Collect data and display it page by pagePagination: on
    Page Event: None
    value= All data to be displayed---When there are many lines to display but scrolling is to be avoided as much as possible
    Pagination (Lazy Loading)Get data page by page and display page by pagePagination: on
    Page Event: Action
    value=data for 1 page
    pagetotalCount= number of rows of all data to display
    value=data for 1 page-----To reduce the amount of data exchanged in an action

    Warnings on Pagination (Lazy Loading)

    • When a loaded page is redisplayed, no action is performed.
    • If the value set in the action is as follows, the data will be treated as the first page of the new list.
      • When pageIndex is set to 0 and value is set to new data
      • If totalCount is changed

    [Details 5] Data Output from XLSX File Export

    Classification of data loading “Bulk Loading” and “Pagination” (Bulk Loading)

    • All data bound to the data grid will be output.
    • If data is extracted with a filter, the extracted data will be output.
    • If a footer is set, footer information is output for all data output at the bottom.

    For data loading classification “Pagination”(Lazy Loading)

    • A button to export a file in XLSX format is displayed, but the output data is not supported.

    Event

    None