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.

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 Row 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
    Page Index
    Page Previous Index
    Total Count
    Selected
    Deleted

    Action

    ItemPropertiesData TypeOptionsDefault value
    IDidstringautomatic
    Header ColorheaderColorstring
    Widthwidthnumber565
    Heightheightnumber230
    Xxnumber
    Yynumber
    Header Adjustment
    Header Word WrapheaderWordWrapstring
  • off
  • normal
  • Off
    Header Font SizeheaderFontSizenumber14
    Header Row HeightheaderRowHeightnumber
    Editableeditableboolean
  • true
  • false
  • true
    One Click EditoneClickEditboolean
  • true
  • false
  • false
    Paginationpaginationboolean
  • true
  • false
  • false
    Visibilityvisibilityboolean
  • true
  • false
  • true
    Export To XlSX ButtonexportToXlsxButtonboolean
  • true
  • false
  • false
    Selectselectionstring
  • row
  • cell
  • complex
  • none
  • row
    Add RowaddButtonboolean
  • true
  • false
  • true
    Delete RowdeleteButtonboolean
  • true
  • false
  • true
    Footerfooterboolean
  • true
  • false
  • false
    Resizableresizableboolean
  • true
  • false
  • false
    Left SplitleftSplitnumber0
    Page SizepageSizenumber100
    Valuevaluearray of object
    Page Event
    Page IndexpageIndexnumber
    Page Previous IndexpagePreviousIndexnumber
    Total CounttotalCountnumber
    Selectedselectednumber
    Deleteddeletedarray of object

    [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"
    }
    ]

    [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

    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.

    [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.

    Type Characteristic UI Dialog Action Data Grid Function Examples of usage scenarios
    Properties What to set in the initial display and search actions What to set in the page event action Sorting Filtering Cell Editing Add Row Delete Row
    Bulk Loading Collect all data and display all
  • Pagination: 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 page
  • Pagination: 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 page
  • Pagination: 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