raffaeles-data-grid-utilities
Reactive icon

Raffaele's Data Grid Utilities

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 29 Jun (22 hours ago)
 by 
0.0
 (0 ratings)
raffaeles-data-grid-utilities

Raffaele's Data Grid Utilities

Documentation
1.0.0

ADDITIONAL EVENTS

These block allow to listen on the specified grid events. As for the default Data Grid events, these blocks need to be inserted in the widget tree AFTER the Data Grid block.

  • OnAutoSizedColumn 
    • This block enables to listen to the OnAutoSizedColumn event of a given grid.

      Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.
      N.B. Auto-size a column triggers also the OnResizedColumn event.

  • OnFreezeColumn
    • This block enables to listen the freeze/unfreeze of columns of a given grid.

      Occurs after one or more columns are frozen (or unfrozen).

  • OnPinnedColumn
    • This block enables to listen to the OnPinnedColumn event of a given grid.

      Occurs after one or more columns are pinned (or unpinned).

  • OnResizedColumn
    • This block enables to listen to the OnResizedColumn event of a given grid.

      Occurs when the user finishes resizing a column
      N.B. Auto-size a column triggers also the OnResizedColumn event.

  • OnUpdatedLayout
    • This block enables to listen to the OnUpdatedLayout event of a given grid.

      Occurs after the grid has updated its internal layout.


UTILITIES

  • EnableLayoutAutoSavingAndSetting
    • Enable the autosaving and autosetting of the grid layout when the user modifies it.
      Once instantiated, the following information will be saved to an internal table to allow the retrieval and the setting of the grid layout:
      • UserId of the current user modifying the grid layout
      • GridWidgetId of the grid that is being modified
      • URL, trucated before query parameters (before the first '?') of the page where the grid is located
      • The grid layout, recovered via GetViewLayout


CLIENT ACTIONS

  • Datagrid_SaveColumnsConfiguration
    • Save a Datagrid column layout
      Can be used in place of the EnableLayoutAutoSavingAndSetting block to have more control on when to save the grid layout
  • Datagrid_SetSavedColumnsConfiguration
    • Set a Datagrid column layout
      Can be used in place of the EnableLayoutAutoSavingAndSetting block to have more control on when to set the saved grid layout
  • Datagrid_GetGridRowsWithFilters
    • Returns the rows on the datagrid, with the filters applied.

      A JSON string of List of the row structure is returned.

  • Datagrid_SetAllowPinningColumns
    • Set the allowPinning property of the datagrid
      N.B. Pinning a column will trigger both OnFreezeColumn and OnPinnedColumn event, but unppining it will only trigger the OnPinnedColumn event.
  • Datagrid_SetHeaderVisibility
    • Set a datagrid headers visibility
  • Datagrid_SetPaginationLabels
    • Set the pagination label of a datagrid

0.1.0

GRID LAYOUT SAVING

The component permits to save grid layouts in different ways:

  1. Fully autonomous

    By calling the client action Datagrid_EnableSaveColumnsConfiguration inside the grid's OnInitialize, the component will listen on layout changes and it will save the current layout of the grid; Use the client action Datagrid_SetSavedColumnsConfiguration to retrieve the saved layout, if any, and to set it to the grid.
  2. Ibrid

    The component makes available the client action Datagrid_SaveColumnsConfiguration, it can be used instead of the Datagrid_EnableSaveColumnsConfiguration to have more control on when to save the grid layout.
  3. Manual

    For maximum control on what and how to save, there are available three server actions: Datagrid_SaveColumnsConfiguration, Datagrid_RemoveColumnsConfiguration and Datagrid_GetColumnsConfiguration;


HEADER VISIBILITY

By using the client action Datagrid_SetHeaderVisibility it is possible to:

  • Hide the columns' header
  • Hide the rows' header
  • Hide both the columns' header and the rows' header


OTHER

Datagrid_GetGridRowsWithFilters

Returns the rows on the datagrid, with the filters applied.
A JSON string of List of the row structure is returned.