Skip navigation links
BBjGridExWidget

Class BBjGridExWidget

Inheritance:
  • Field Detail

    • Debug!

      public static BBjNumber Debug!

      When true the grid will use the unmingled version of the Javascript code then open the debugger in a new window.

    • Executor!

      public GxExecutor Executor!

      Instance of he scripts executor

    • ForceCommunityBuild!

      public static BBjNumber ForceCommunityBuild!

      When true, the grid will force using the community version of the grid whether there is a license key or not.

    • HTMLView!

      public BBjHtmlView HTMLView!

      Instance of the created HTMLView

    • IsReady!

      public Boolean IsReady!

      A flag which defines when the grid is ready and the process events started

    • LicenseKey$

      public static BBjString LicenseKey$

      The Grid enterprise key

    • Options!

      public GxOptions Options!

      Instance of the grid options class

    • RowNodeId$

      public BBjString RowNodeId$

      The unique string to use as row index. default is __ROW_INDEX

    • RS!

      public ResultSet RS!

      The ResultSet instance

  • Constructor Detail

    • BBjGridExWidget

      public BBjGridExWidget()

      disabled default constructor

    • BBjGridExWidget

      public BBjGridExWidget(BBjChildWindow wnd!)

      The constructor that creates the widget in the ChildWindow

      Parameters:
      BBjChildWindow wnd!: the child window in which to create the BBjGridExWidget
    • BBjGridExWidget

      public BBjGridExWidget(BBjChildWindow wnd!, BBjString template$)

      The constructor that creates the widget in the ChildWindow

      Parameters:
      BBjChildWindow wnd!: the child window in which to create the BBjGridExWidget
      BBjString template$ The client's HTML template to use in order to build the grid. By default you will never need to change the default Template. Unless you want to do something really unusual
    • BBjGridExWidget

      public BBjGridExWidget(BBjString rootId!, BBjChildWindow wnd!)

      The constructor that creates the widget in the ChildWindow

      Parameters:
      BBjString rootId! The root ID of the grid. This is used to identify the grid in the client side. This is useful when you have multiple grids in the same window. By default the root ID is a random string.
      BBjChildWindow wnd!: the child window in which to create the BBjGridExWidget
    • BBjGridExWidget

      public BBjGridExWidget(BBjString rootId!, BBjChildWindow wnd!, BBjString template$)

      The constructor that creates the widget in the ChildWindow

      Parameters:
      BBjString rootId! The root ID of the grid. This is used to identify the grid in the client side. This is useful when you have multiple grids in the same window. By default the root ID is a random string.
      BBjChildWindow wnd!: the child window in which to create the BBjGridExWidget
      BBjString template$ The client's HTML template to use in order to build the grid. By default you will never need to change the default Template. Unless you want to do something really unusual
    • BBjGridExWidget

      public BBjGridExWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!)

      The constructor that creates the widget on wnd!

      Parameters:
      BBjWindow wnd!! parent window
      BBjNumber id! the control ID
      BBjNumber x! x-location
      BBjNumber y! y-location
      BBjNumber w! width
      BBjNumber h! height
    • BBjGridExWidget

      public BBjGridExWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h! , BBjString template$)

      The constructor that creates the widget on wnd!

      Parameters:
      BBjWindow wnd!! parent window
      BBjNumber id! the control ID
      BBjNumber x! x-location
      BBjNumber y! y-location
      BBjNumber w! width
      BBjNumber h! height
      BBjString template$ The client's HTML template to use in order to build the grid. By default you will never need to change the default Template. Unless you want to do something really unusual
    • BBjGridExWidget

      public BBjGridExWidget(BBjString rootId!, BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!)

      The constructor that creates the widget on wnd!

      Parameters:
      BBjString rootId! The root ID of the grid. This is used to identify the grid in the client side. This is useful when you have multiple grids in the same window. By default the root ID is a random string.
      BBjWindow wnd!! parent window
      BBjNumber id! the control ID
      BBjNumber x! x-location
      BBjNumber y! y-location
      BBjNumber w! width
      BBjNumber h! height
    • BBjGridExWidget

      public BBjGridExWidget(BBjString rootId!, BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h! , BBjString template$)

      The constructor that creates the widget on wnd!

      Parameters:
      BBjString rootId! The root ID of the grid. This is used to identify the grid in the client side. This is useful when you have multiple grids in the same window. By default the root ID is a random string.
      BBjWindow wnd!! parent window
      BBjNumber id! the control ID
      BBjNumber x! x-location
      BBjNumber y! y-location
      BBjNumber w! width
      BBjNumber h! height
      BBjString template$ The client's HTML template to use in order to build the grid. By default you will never need to change the default Template. Unless you want to do something really unusual
    • Method Detail

      • addAlignedGrid

        public void addAlignedGrid(BBjGridExWidget widget!)

        Align the current grid with the passed one

        Aligning two or more grids means columns will be kept aligned in all grids. In other words, column changes to one grid (column width, column order, column visibility etc) are reflected in the other grid. This is useful if you have two grids, one above the other such that their columns are vertically aligned, and you want to keep the columns aligned.

        Parameters:
        BBjGridExWidget widget!
      • addChartToolbarItem

        public void addChartToolbarItem(BBjString item!)

        Enable a chart toolbar item


        #Enterprise
        #Configuration
        #API

        See Also:
        CHART_TOOLBAR_SETTINGS()
        CHART_TOOLBAR_DATA()
        CHART_TOOLBAR_FORMAT()
        CHART_TOOLBAR_DOWNLOAD()
      • addColumn

        public GxColumn addColumn(GxColumn definition!)

        Add new column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The definition instance
      • addColumn

        public GxColumn addColumn(BBjString field!, BBjNumber type!)

        Add new column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The definition instance
      • addColumn

        public GxColumn addColumn(BBjString field!, BBjString label!)

        Add new column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The definition instance
      • addColumn

        public GxColumn addColumn(BBjString field!, BBjString label!, BBjNumber type!)

        Add new column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The definition instance
      • addColumn

        public GxColumn addColumn(BBjString field!)

        Add new column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The definition instance
      • addColumnGroup

        public GxColumnGroup addColumnGroup(GxColumnGroup definition!)

        Add column group


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString label! The group label
      • addColumnGroup

        public GxColumnGroup addColumnGroup(BBjString id!)

        Add column group


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString label! The group label
      • addColumnGroup

        public GxColumnGroup addColumnGroup(BBjString id!, BBjString label!)

        Add column group


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString label! The group label
      • addColumnGroup

        public GxColumnGroup addColumnGroup(BBjString id!, BBjString label!, BBjVector columns!, BBjNumber marryChildren!, BBjString headerClass! )

        Add column group


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString label! The group label/name
        BBjVector columns! Vector of columns ids/fields to use
        BBjNumber marryChildren! Set to 'true' to keep columns in this group beside each other in the grid. Moving the columns outside of the group (and hence breaking the group) is not allowed.
        BBjString headerClass! A CSS class to apply
        Returns:
        GxColumnGroup The GxColumnGroup instance
      • addColumnGroup

        public GxColumnGroup addColumnGroup(BBjString id!, BBjString label!, BBjVector columns!, BBjNumber marryChildren!)

        Group Vector of Columns


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString label! The group label/name
        BBjVector columns! Vector of columns ids/fields to use
        BBjNumber marryChildren! Set to 'true' to keep columns in this group beside each other in the grid. Moving the columns outside of the group (and hence breaking the group) is not allowed.
        Returns:
        GxColumnGroup The GxColumnGroup instance
      • addColumnGroup

        public GxColumnGroup addColumnGroup(BBjString id!, BBjString label!, BBjVector columns!)

        Group Vector of Columns


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The group id
        BBjString name! The group label/name
        BBjVector columns! Vector of columns ids/fields to use
        Returns:
        GxColumnGroup The GxColumnGroup instance
      • addPivotColumns

        public void addPivotColumns(BBjString columns!)

        Enable pivot for columns


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • addRangeChart

        public BBjString addRangeChart(GxClientAddRangeChartModel model!)

        Clear already created charts. Note that this method does not clear user created charts


        #API

        Parameters:
        GxClientAddRangeChartModel model! the add range model
        Returns:
        BBjString A unique id for the created chart
      • addRangeSelection

        public GxClientAddRangeSelectionModel addRangeSelection(BBjString columns!, BBjString start!, BBjString end!)

        Add new range selection


        #API

        Parameters:
        BBjString columns! columns as comma separated string (ex: CDNUMBER, COST)
        BBjString start! start row id or index
        BBjString end! end row id or index
        Returns:
        GxClientAddRangeSelectionModel
      • addRangeSelection

        public GxClientAddRangeSelectionModel addRangeSelection(BBjString columns!, BBjNumber start!, BBjNumber end!)

        Add new range selection


        #API

        Parameters:
        BBjString columns! columns as comma separated string (ex: CDNUMBER, COST)
        BBjNumber start! start row id or index
        BBjNumber end! end row id or index
        Returns:
        GxClientAddRangeSelectionModel
      • addRangeSelection

        public GxClientAddRangeSelectionModel addRangeSelection(BBjString columns!)

        Add new range selection


        #API

        Parameters:
        BBjString columns! columns as comma separated string (ex: CDNUMBER, COST)
        Returns:
        GxClientAddRangeSelectionModel
      • addRow

        public GxClientTransactionModel addRow(BBjNumber index!, DataRow row!)

        Add new row


        #API

        Parameters:
        BBjNumber index! The insert index
        DataRow row! DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • addRow

        public GxClientTransactionModel addRow(DataRow row!)

        Add new row at the beginning of the grid


        #API

        Parameters:
        DataRow row! The DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • addRowGroupColumns

        public void addRowGroupColumns(BBjString columns!)

        Enable row grouping for columns


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • addStyle

        public void addStyle(BBjString selector$, JsonObject rules! )

        Add Style block


        #API

        Parameters:
        selector$ : Css Selector
        rules! : Css Rules object as json object
      • addStyle

        public void addStyle(BBjString selector$, BBjString rules! )

        Add Style block


        #API

        Parameters:
        selector$ : Css Selector
        rules! : Css Rules object as string
      • addValueColumns

        public void addValueColumns(BBjString columns!)

        Enable value for columns


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • autoSizeColumns

        public void autoSizeColumns(HashSet columns!, BBjNumber skipHeader!)

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

        Parameters:
        HashSet columns! A set of columns to auto size
        BBjNumber skipHeader! indicate that the header content (headerName) should not be considered when calculating the width of the column. You can also set this behavior to be the default by setting SkipHeaderOnAutoSize: true in the grid options.
      • autoSizeColumns

        public void autoSizeColumns(HashSet columns!)

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

        Parameters:
        HashSet columns! A set of columns to auto size
      • autoSizeColumns

        public void autoSizeColumns(BBjString columns!, BBjNumber skipHeader!)

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

        Parameters:
        BBjString columns! A common separated list of columns to auto size
        BBjNumber skipHeader! indicate that the header content (headerName) should not be considered when calculating the width of the column. You can also set this behavior to be the default by setting SkipHeaderOnAutoSize: true in the grid options.
      • autoSizeColumns

        public void autoSizeColumns(BBjString columns!)

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

        Parameters:
        BBjString columns! A comma separated list of columns to auto size
      • autoSizeColumns

        public void autoSizeColumns(BBjNumber skipHeader!)

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

        Parameters:
        BBjNumber skipHeader! indicate that the header content (headerName) should not be considered when calculating the width of the column. You can also set this behavior to be the default by setting SkipHeaderOnAutoSize: true in the grid options.
      • autoSizeColumns

        public void autoSizeColumns()

        looks at the rendered cells on the screen, and works out the width based on what it sees. It cannot see the columns that are not rendered due to column virtualisation. Thus it is not possible to autosize a column that is not visible on the screen.

        Column Virtualisation is the technique the grid uses to render large amounts of columns with degrading performance by only rendering columns that are visible due to the horizontal scroll positions. Eg the grid can have 1000 columns with only 10 rendered if the horizontal scroll is only showing 10 columns. To get around this, you can turn off column virtualisation by setting grid options SuppressColumnVirtualisation=true.


        #API

      • buildColumnsFromResultSet

        public void buildColumnsFromResultSet(ResultSet rs!, BBjNumber addAll!)

        Build the column definitions from the passed ResultSet

        Parameters:
        ResultSet rs! ResultSet with the data
        BBjNumber addAll! When true, We will create a column definition for every column in the ResultSet, otherwise update the existing ones only
      • CHART_TOOLBAR_DATA

        public static BBjString CHART_TOOLBAR_DATA()

        Constant value which defines that chart toolbar data item

        Returns:
        BBjString
      • CHART_TOOLBAR_DOWNLOAD

        public static BBjString CHART_TOOLBAR_DOWNLOAD()

        Constant value which defines that chart toolbar download item

        Returns:
        BBjString
      • CHART_TOOLBAR_FORMAT

        public static BBjString CHART_TOOLBAR_FORMAT()

        Constant value which defines that chart toolbar format item

        Returns:
        BBjString
      • CHART_TOOLBAR_SETTINGS

        public static BBjString CHART_TOOLBAR_SETTINGS()

        Constant value which defines that chart toolbar settings item

        Returns:
        BBjString
      • clearCallback

        public void clearCallback(int type!)

        Remove callback

        Parameters:
        Int type! The event's type
      • clearChart

        public void clearChart(BBjString id!)

        Clear already created chart by its id


        #API Note that this method does not clear user created charts

        Parameters:
        BBjString id! the chart's id to destroy
      • clearChart

        public void clearChart()

        Clear already created charts. Note that this method does not clear user created charts


        #API

      • clearColumnDefinitions

        public void clearColumnDefinitions()

        Alias for resetAllColumns()


        #Configuration
        #ColumnsRenderer

        See Also:
        resetAllColumns()
      • clearData

        public void clearData()

        Clear row data (Empty the grid )


        #API

      • clearFilters

        public void clearFilters()

        Clear all active filters on columns


        #API

      • clearRangeSelection

        public void clearRangeSelection()

        Clears the selected range.


        #API

      • clearRowsData

        public void clearRowsData()

        Clear row data (Empty the grid )


        #API

        Deprecated:
        since version 0.101.0, BBjGridExWidget.clearRowsData() is deprecated / renamed. Use BBjGridExWidget.clearData() instead.
      • collapseAll

        public void collapseAll()

        collapse all groups


        #API

      • copyWebAssets

        public String copyWebAssets(BBjString script!)

        Inject a js Script.

        Parameters:
        BBjString script! The javascript code to inject
        BBjNumber top! If true, the script will be injected at iframe's parent
      • deselectAll

        public void deselectAll()

        deselect all rows


        #API

      • deselectAll

        public void deselectAll(BBjNumber x!)

        deselect all rows


        #API

        Parameters:
        BBJNumber x!: 0 deselect all, 1 deselect all filtered
      • destroy

        public void destroy()

        Destroy the grid

      • ensureColumnVisible

        public void ensureColumnVisible(BBjString columnId!)

        Ensures the column is visible, scrolling the table if needed.


        #API

        Parameters:
        BBJString columnid!: the column id
      • ensureIndexVisible

        public void ensureIndexVisible(BBjString key!, BBjString position!)

        Ensures the row key is visible by vertically scrolling the grid

        Ensures the row index is visible by vertically scrolling the grid. The valid values for positions are {'top', 'middle', 'bottom'}. If top, middle or bottom, the grid will scroll the row to place the row at top, middle or bottom


        #API

        Parameters:
        BBjString key!: the row key
        BBjString position!: the scrolling position
        See Also:
        GRID_ROWPOS_TOP()
        GRID_ROWPOS_MIDDLE()
        GRID_ROWPOS_BOTTOM()
      • ensureIndexVisible

        public void ensureIndexVisible(BBjNumber index!, BBjString position!)

        Ensures the row index is visible by vertically scrolling the grid

        Ensures the row index is visible by vertically scrolling the grid. The valid values for positions are {'top', 'middle', 'bottom'}. If top, middle or bottom, the grid will scroll the row to place the row at top, middle or bottom


        #API

        Parameters:
        BBjNumber index!: the row index
        BBjString position!: the scrolling position
        See Also:
        GRID_ROWPOS_TOP()
        GRID_ROWPOS_MIDDLE()
        GRID_ROWPOS_BOTTOM()
      • executeFilterTransaction

        public void executeFilterTransaction(LinkedHashMap transaction!)

        Set and apply a filter transaction

        The transaction is a LinkedHashMap of columns and their models. This the fastest way to apply several filters on several columns. When using this method The grid will delay executing the filters on the data until all models are set and ready.


        #API
        #Configuration

        Parameters:
        LinkedHashMap transaction! a map of columns and their model
      • executeScript

        public Object executeScript(BBjString script$)

        Execute a javascript code on the client.

        Note that if the grid is not ready yet , then script will queued until the grid is ready then send to the client. If some reason you do not want this behavior , then use the executeScript method from the created internal HTML View

        Parameters:
        BBjString script$ The javascript code
        Returns:
        Object returned value, if any
        See Also:
        BBjHtmlView::executeScript
      • executeUpdateTransaction

        public void executeUpdateTransaction(GxClientTransactionModel transaction!, BBjNumber batchUpdate!)

        Execute a bulk update on the grid

        The transaction method is to pass a transaction object to the grid containing rows to add, remove and update.

        The grid keeps all active sorting, grouping and filtering, including updating to reflect the changes in the data should the sorting, grouping or filtering be impacted.

        Updating using transactions is the best way to do large updates to the grid, as the grid treats them as delta changes, so the grid only refreshes what is needed giving a performance boost.

        All row and range selection will be kept.

        Note that all update done on the grid will reflected also on the ResultSet instance which is the grid is using.


        #API

        Parameters:
        GxClientTransactionModel transaction!
        BBjNumber batchUpdate! when true then execute the update, along with any other updates you subsequently provide
      • executeUpdateTransaction

        public void executeUpdateTransaction(GxClientTransactionModel transaction!)

        Execute a bulk update on the grid

        The transaction method is to pass a transaction object to the grid containing rows to add, remove and update.

        The grid keeps all active sorting, grouping and filtering, including updating to reflect the changes in the data should the sorting, grouping or filtering be impacted.

        Updating using transactions is the best way to do large updates to the grid, as the grid treats them as delta changes, so the grid only refreshes what is needed giving a performance boost.

        All row and range selection will be kept.

        Note that all update done on the grid will reflected also on the ResultSet instance which is the grid is using.


        #API

        Parameters:
        GxClientTransactionModel transaction!
      • expandAll

        public void expandAll()

        Expand all groups


        #API

      • focus

        public void focus(BBjString row!, BBjString column!, BBjString floating!)

        Set the focus on the given row id and the given column


        #API

        Parameters:
        BBjString row! The row id
        BBjString column! The column id
        BBjString floating! The row floating (top , bottom or none)
        See Also:
        BBjGridExWidget.GRID_FLOATING_NONE()
        BBjGridExWidget.GRID_FLOATING_TOP()
        BBjGridExWidget.GRID_FLOATING_BOTTOM()
      • focus

        public void focus(BBjString row!, BBjString column!)

        Set the focus on the given row id and the given column


        #API

        Parameters:
        BBjString row! The row id
        BBjString column! The column id
      • focus

        public void focus(BBjString row!)

        Set the focus on the given row id and the first column


        #API

        Parameters:
        BBjString row! The row id
      • focus

        public void focus(BBjNumber row!, BBjString column!, BBjString floating!)

        Set the focus on the given row id and the given column


        #API

        Parameters:
        BBjNumber row! The row id
        BBjString column! The column id
        BBjString floating! The row floating
        See Also:
        BBjGridExWidget.GRID_FLOATING_NONE()
        BBjGridExWidget.GRID_FLOATING_TOP()
        BBjGridExWidget.GRID_FLOATING_BOTTOM()
      • focus

        public void focus(BBjNumber row!, BBjString column!)

        Set the focus on the given row id and the given column


        #API

        Parameters:
        BBjNumber row! The row id
        BBjString column! The column id
      • focus

        public void focus(BBjNumber row!)

        Set the focus on the given row id and the first column


        #API

        Parameters:
        BBjNumber row! The row id
      • focus

        public void focus()

        Will set the focus on the first cell of the first row. In case the grid has already a different selected cell , the the method will retain this information.


        #API

      • getAsJsonObject

        public JsonObject getAsJsonObject()

        Build the grid json configuration object

        Returns:
        JsonObject The grid options as JsonObject
      • getBundle

        public String getBundle()

        For BUI, inject the $gw_wnd and $gw_doc variables in the iframe. This will make sure the variables are available for all js code executed in the iframe.

      • getClientContext

        public JsonObject getClientContext()

        Get the grid's client context

        Returns:
        JsonObject
      • getClientJsonFactory

        public GxClientJsonFactory getClientJsonFactory()

        Get instance of GxClientJsonFactory

        Returns:
        GxClientJsonFactory
      • getColumn

        public GxColumn getColumn(BBjString field!)

        Get the column definition instance


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn return the column definition instance if found, null() otherwise
      • getColumnGroup

        public GxColumnGroup getColumnGroup(BBjString id!)

        Get the column group definition instance


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The column group definition id
        Returns:
        GxColumn return the column group definition instance if found, null() otherwise
      • getColumnState

        public GxState getColumnState()

        Get the grid's columns , sorting and filtering state


        #API

        Deprecated:
        since version 0.101.0, BBjGridExWidget.getColumnState() is deprecated / renamed. Use BBjGridExWidget.getState() instead.
      • getContextMenu

        public GxContextMenu getContextMenu()

        Get the grid default context menu

        Returns:
        GxContextMenu
      • getControlType

        public int getControlType()

        Get the unique control type

      • getFilterAsCombinedModel

        public GxClientFilterCombinedModel getFilterAsCombinedModel(BBjString column!)

        Get The combined filter model for the given column

        This method will return a GxClientFilterCombinedModel for the given column If the column has already some filter values set through the UI , then the model will contain these changes too.

        In case the grid is not ready (not renderer yet) then the method will just return any empty combined filter model for the column.


        #API
        #Configuration

        Parameters:
        BBjString column! the column id to use for the constructed model
        Throws:
        256 in case the column filter does not support the combined model
      • getFilterModel

        public GxClientFilterModel getFilterModel(BBjString column!)

        Get The filter model for the given column

        This method will return a GxClientFilterModel for the given column If column has already some filter values set through the UI , then the model will contain these changes too.

        In case the grid is not ready (not renderer yet) then the method will just return any empty filter model for the column.


        #API
        #Configuration

        Parameters:
        BBjString column! the column id to use for the constructed model
        Throws:
        256 in case the column has no filter component attached
      • getImageData

        public static BBjString getImageData(BBjString filename!)

        Alias for imageToBase64()

        See Also:
        imageToBase64()
      • getInstanceCount

        public static BBjNumber getInstanceCount()

        Return the number of initiated instances of the grid

        Returns:
        BBjNumber The number of instances
        See Also:
        Issue 251
        Deprecated:
        this method is deprecated and will be removed in the next release. The method will return a wrong value if the BBj session is different from the one in which the grid was initiated.
      • getLanguageManager

        public GxLanguageManager getLanguageManager()

        Get the language manager instance

      • getPinnedBottomRows

        public ResultSet getPinnedBottomRows()

        Get the pinned bottom rows as defined in the grid options

        Returns:
        ResultSet The pinned rows
      • getPinnedBottomRowsCount

        public BBjNumber getPinnedBottomRowsCount()

        Get the count of pinned rows on bottom

        Parameters:
        BBjNumber rows count
      • getPinnedTopRows

        public ResultSet getPinnedTopRows()

        Get the pinned top rows as defined in the grid options

        Returns:
        ResultSet The pinned rows
      • getPinnedTopRowsCount

        public BBjNumber getPinnedTopRowsCount()

        Get the count of pinned rows on top

        Parameters:
        BBjNumber rows count
      • getPivotMode

        public BBjNumber getPivotMode()

        Check if pivot mode is enabled or disabled


        #Configuration
        #API

        Returns:
        BBjNumber 1 when pivot mode is enabled, 0 otherwise
      • getRangeSelections

        public BBjVector getRangeSelections()

        The method will return a vector of the selected ranges including columns and rows


        #API

        Returns:
        BBjVector
      • getRootId

        public BBjString getRootId()

        Get the root id of the grid

        The root id is a unique & auto-generated id for the grid instance. This id is used in the client to distinguish the grid instances

        Returns:
        BBjString the root id
      • getRow

        public GxClientRowModel getRow(BBjString key!)

        Returns the row with the given key from the grid.

        Note : if you only need to get the row and you don't care about other meta data like parent(when grouping) , isSelected, ... then use the ResultSet API (ex ResultSet.getItem(BBjString key!) )

        Parameters:
        BBjString key! the row's key
        Returns:
        GxClientRowModel the grid's row model
        See Also:
        ResultSet.getItem
      • getRows

        public BBjVector getRows(BBjString phase!, BBjString filterExpression!)

        Get the rows from grid in the given phase after applying the given filter expression.

        Note: if you only need to get the whole rows from the grid and you don't care about filtering and sorting Then retrieve them from ResultSet as this will be faster especially in BUI

        Parameters:
        BBjString phase! The rows phase
        BBjString filterExpression! A filter expression to execute before returning the rows. The expression must return true or false for the given row
        Returns:
        BBjVector A vector of GxClientRowModel(s)
        See Also:
        #GRID_ROWS_PHASE_ALL()
        #GRID_ROWS_PHASE_AFTER_FILTER()
        #GRID_ROWS_PHASE_AFTER_FILTER_SORT()
        see GxExpression
      • getRows

        public BBjVector getRows(BBjString phase!, GxExpressionInterface filterExpression!)

        Get the rows from grid in the given phase after applying the given filter expression.

        Note: if you only need to get the whole rows from the grid and you don't care about filtering and sorting Then retrieve them from ResultSet as this will be faster especially in BUI

        Parameters:
        BBjString phase! The rows phase
        GxExpressionInterface filterExpression! A filter expression to execute before returning the rows. The expression must return true or false for the given row
        Returns:
        BBjVector A vector of GxClientRowModel(s)
        See Also:
        #GRID_ROWS_PHASE_ALL()
        #GRID_ROWS_PHASE_AFTER_FILTER()
        #GRID_ROWS_PHASE_AFTER_FILTER_SORT()
        see GxExpression
      • getRows

        public BBjVector getRows(BBjString phase!)

        Get the rows from grid in the given phase after applying the given filter expression.

        Note: if you only need to get the whole rows from the grid and you don't care about filtering and sorting Then retrieve them from ResultSet as this will be faster especially in BUI

        Parameters:
        BBjString phase! The rows phase
        Returns:
        BBjVector A vector of GxClientRowModel(s)
        See Also:
        #GRID_ROWS_PHASE_ALL()
        #GRID_ROWS_PHASE_AFTER_FILTER()
        #GRID_ROWS_PHASE_AFTER_FILTER_SORT()
      • getRows

        public BBjVector getRows()

        Get the rows from grid after sorting and filtering

        Returns:
        BBjVector A vector of GxClientRowModel(s)
      • getSelectedRow

        public GxClientRowModel getSelectedRow()

        Get the current selected row


        #API

        Returns:
        GxClientRowModel The selected row if any, null() otherwise
      • getSelectedRows

        public BBjVector getSelectedRows()

        Get Array of selected rows


        #API

        Returns:
        BBjVector A vector filled with the selected rows
      • getSidebar

        public GxSidebar getSidebar()

        Get the grid sidebar instance

        Returns:
        GxSidebar
      • getState

        public GxState getState()

        Get the grid's columns , sorting and filtering state


        #API

      • getStatusbar

        public GxStatusBar getStatusbar()

        Get the grid statusbar instance

        Returns:
        GxStatusBar
      • getThemes

        public BBjVector getThemes()

        Get the grid supported themes


        #API

        Returns:
        BBjVector array of theme names
        See Also:
        GRID_THEME_BALHAM()
        GRID_THEME_BALHAM_DARK()
        GRID_THEME_MATERIAL()
      • GRID_ALIGN_CENTER

        public static BBjNumber GRID_ALIGN_CENTER()

        Constant value to define centered column

        Returns:
        BBjNumber
      • GRID_ALIGN_LEFT

        public static BBjNumber GRID_ALIGN_LEFT()

        Constant value to define left aligned column

        Returns:
        BBjNumber
      • GRID_ALIGN_RIGHT

        public static BBjNumber GRID_ALIGN_RIGHT()

        Constant value to define right aligned column

        Returns:
        BBjNumber
      • GRID_EDITTYPE_CELL

        public static BBjString GRID_EDITTYPE_CELL()

        Constant value to define editing mode "cell"

        Returns:
        BBjString
      • GRID_EDITTYPE_ROW

        public static BBjString GRID_EDITTYPE_ROW()

        Constant value to define editing mode "row"

        Returns:
        BBjString
      • GRID_ENTER_NEXT_CELL

        public static BBjString GRID_ENTER_NEXT_CELL()

        Constant value to define enter key behavior (Move to next cell)

        Returns:
        BBjString
      • GRID_ENTER_STOP_EDITING

        public static BBjString GRID_ENTER_STOP_EDITING()

        Constant value to define enter key behavior (Stop editing)

        Returns:
        BBjString
      • GRID_FLOATING_BOTTOM

        public static BBjString GRID_FLOATING_BOTTOM()

        Constant value which defines the rows floating on bottom

        Returns:
        BBjString
      • GRID_FLOATING_NONE

        public static BBjString GRID_FLOATING_NONE()

        Constant value which defines the rows with no floating

        Returns:
        BBjString
      • GRID_FLOATING_TOP

        public static BBjString GRID_FLOATING_TOP()

        Constant value which defines the rows floating on top

        Returns:
        BBjString
      • GRID_GROUPPANEL_SHOW_HIDDEN

        public static BBjString GRID_GROUPPANEL_SHOW_HIDDEN()

        Constant value which defines that group panel must always be hidden

        Returns:
        BBjString
      • GRID_GROUPPANEL_SHOW_ONGROUPING

        public static BBjString GRID_GROUPPANEL_SHOW_ONGROUPING()

        Constant value which defines that group panel must be shown only when grouping

        Returns:
        BBjString
      • GRID_GROUPPANEL_SHOW_VISIBLE

        public static BBjString GRID_GROUPPANEL_SHOW_VISIBLE()

        Constant value which defines that group panel must always be shown

        Returns:
        BBjString
      • GRID_NAVIGATION_BEHAVIOUR_NEXT_CELL

        public static BBjString GRID_NAVIGATION_BEHAVIOUR_NEXT_CELL()

        Constant value to define navigation behavior (Move to next cell)

        Returns:
        BBjString
      • GRID_NAVIGATION_BEHAVIOUR_NEXT_ROW

        public static BBjString GRID_NAVIGATION_BEHAVIOUR_NEXT_ROW()

        Constant value to define navigation behavior (Move to next row)

        Returns:
        BBjString
      • GRID_ROWPOS_BOTTOM

        public static BBjString GRID_ROWPOS_BOTTOM()

        Constant value to define row position

        Returns:
        BBjString
      • GRID_ROWPOS_MIDDLE

        public static BBjString GRID_ROWPOS_MIDDLE()

        Constant value to define row position

        Returns:
        BBjString
      • GRID_ROWPOS_TOP

        public static BBjString GRID_ROWPOS_TOP()

        Constant value to define row position

        Returns:
        BBjString
      • GRID_ROWS_PHASE_AFTER_FILTER

        public static BBjString GRID_ROWS_PHASE_AFTER_FILTER()

        Constant value which describes the rows in after filtering phase.

        Returns:
        BBjString
      • GRID_ROWS_PHASE_AFTER_FILTER_SORT

        public static BBjString GRID_ROWS_PHASE_AFTER_FILTER_SORT()

        Constant value which describes the rows in after filtering and sorting phase.

        Returns:
        BBjString
      • GRID_ROWS_PHASE_ALL

        public static BBjString GRID_ROWS_PHASE_ALL()

        Constant value which describes the rows in before sorting and filtering phase.

        Returns:
        BBjString
      • GRID_THEME_ALPINE

        public static BBjString GRID_THEME_ALPINE()

        Constant value which defines the alpine theme

        Returns:
        BBjString
      • GRID_THEME_ALPINE_DARK

        public static BBjString GRID_THEME_ALPINE_DARK()

        Constant value which defines the alpine dark theme

        Returns:
        BBjString
      • GRID_THEME_BALHAM

        public static BBjString GRID_THEME_BALHAM()

        Constant value which defines that balham theme

        Returns:
        BBjString
      • GRID_THEME_BALHAM_DARK

        public static BBjString GRID_THEME_BALHAM_DARK()

        Constant value which defines that balham dark theme

        Returns:
        BBjString
      • GRID_THEME_MATERIAL

        public static BBjString GRID_THEME_MATERIAL()

        Constant value which defines the material theme

        Returns:
        BBjString
      • hasColumn

        public BBjNumber hasColumn(BBjString field!)

        Check if the column definition exists


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        BBjNumber return 1 when found, 0 otherwise
      • hasColumnGroup

        public BBjNumber hasColumnGroup(BBjString id!)

        Check if the column group definition exists


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The column group definition id
        Returns:
        BBjNumber return 1 when found, 0 otherwise
      • hideOverlay

        public void hideOverlay()

        Clear all overlays


        #API

      • imageToBase64

        public static BBjString imageToBase64(BBjString filename!)

        Convert the image at the given path to base64 string

        Parameters:
        BBjString filename! The image's path
        Returns:
        BBjString Image as base64 string
      • includeClientRowDataInRowModels

        public void includeClientRowDataInRowModels(BBjNumber include!)

        Sync the client row data every time a new GxClientRowModel is composed by the grid.

        Use this method if the row's data in the client is different that the row's data in the ResultSet

        Parameters:
        BBjNumber include! when true the ClientRow field will always be filled in GxClientRowModel otherwise it will always be null().
        #Configuration
        #API
      • injectScript

        public void injectScript(BBjString script!, BBjNumber top!)

        Inject a js Script.

        Parameters:
        BBjString script! The javascript code to inject
        BBjNumber top! If true, the script will be injected at iframe's parent
      • injectScript

        public void injectScript(BBjString script!)

        Inject a js Script at the top window (iframe's parent window if any).

        Parameters:
        BBjString script! The javascript code to inject
      • isLicensed

        public static BBjNumber isLicensed()

        The method will check whether the grid has license key or not.

        Returns:
        BBjNumber true when a license key is found, false otherwise
      • isWebGui

        public boolean isWebGui()
      • makeHexColor

        public static BBjString makeHexColor(BBjColor color!)

        Make Hex Color

        Convert the given BBjColor to a hex color string

        Parameters:
        BBjColor color! BBj color
        Returns:
        BBjString hex color
      • moveColumn

        public void moveColumn(BBjString Field$, BBjNumber toIndex!)

        Change column position


        #API

        Parameters:
        BBjString field$ The field name of the column
        BBjNumber toIndex! The new column position/index
      • moveToNextCell

        public void moveToNextCell()

        Start Next Cell Editing


        #API

      • moveToPreviousCell

        public void moveToPreviousCell()

        Move to previous cell


        #API

      • ON_GRID_CELL_CLICK

        public static BBjNumber ON_GRID_CELL_CLICK()

        Constant value to define cell click event

        Returns:
        BBjNumber
      • ON_GRID_CELL_DOUBLE_CLICK

        public static BBjNumber ON_GRID_CELL_DOUBLE_CLICK()

        Constant value to define cell double-click event

        Returns:
        BBjNumber
      • ON_GRID_CELL_EDITING_STARTED

        public static BBjNumber ON_GRID_CELL_EDITING_STARTED()

        Constant value to define cell editing start event

        Returns:
        BBjNumber
      • ON_GRID_CELL_EDITING_STOPPED

        public static BBjNumber ON_GRID_CELL_EDITING_STOPPED()

        Constant value to define cell editing stop event

        Returns:
        BBjNumber
      • ON_GRID_CELL_VALUE_CHANGED

        public static BBjNumber ON_GRID_CELL_VALUE_CHANGED()

        Constant value to define cell value changed event

        Returns:
        BBjNumber
      • ON_GRID_COLUMN_STATE_CHANGE

        public static BBjNumber ON_GRID_COLUMN_STATE_CHANGE()

        Alias for ON_GRID_STATE_CHANGE()

        Returns:
        BBjNumber
        See Also:
        ON_GRID_STATE_CHANGE()
      • ON_GRID_DOUBLE_CLICK

        public static BBjNumber ON_GRID_DOUBLE_CLICK()

        Alias to ON_GRID_ROW_DOUBLE_CLICK()

        Returns:
        BBjNumber
        See Also:
        ON_GRID_ROW_DOUBLE_CLICK()
      • ON_GRID_FILTER_CHANGED

        public static BBjNumber ON_GRID_FILTER_CHANGED()

        Constant value to define A filter changed event.

        Returns:
        BBjNumber
      • ON_GRID_KEYPRESS

        public static BBjNumber ON_GRID_KEYPRESS()

        Constant value to define keyboard keypress

        Returns:
        BBjNumber
      • ON_GRID_RANGE_SELECTION_CHANGED

        public static BBjNumber ON_GRID_RANGE_SELECTION_CHANGED()

        Constant value to define range selection event

        Returns:
        BBjNumber
      • ON_GRID_READY

        public static BBjNumber ON_GRID_READY()

        Constant value to define the grid ready event.

        Returns:
        BBjNumber
      • ON_GRID_ROW_CLICK

        public static BBjNumber ON_GRID_ROW_CLICK()

        Constant value to define row click events

        Returns:
        BBjNumber
      • ON_GRID_ROW_DOUBLE_CLICK

        public static BBjNumber ON_GRID_ROW_DOUBLE_CLICK()

        Constant value to define row double-click event

        Returns:
        BBjNumber
      • ON_GRID_ROW_EDITING_STARTED

        public static BBjNumber ON_GRID_ROW_EDITING_STARTED()

        Constant value to define row editing start event

        Returns:
        BBjNumber
      • ON_GRID_ROW_EDITING_STOPPED

        public static BBjNumber ON_GRID_ROW_EDITING_STOPPED()

        Constant value to define row editing stop event

        Returns:
        BBjNumber
      • ON_GRID_ROW_SELECT

        public static BBjNumber ON_GRID_ROW_SELECT()

        Alias for ON_GRID_SELECT_ROW

        Returns:
        BBjNumber
      • ON_GRID_ROW_VALUE_CHANGED

        public static BBjNumber ON_GRID_ROW_VALUE_CHANGED()

        Constant value to define A row has changed. This event corresponds to Full Row Editing only.

        Returns:
        BBjNumber
      • ON_GRID_SELECT_ROW

        public static BBjNumber ON_GRID_SELECT_ROW()

        A Constant value to define row selection (selected/deselected) change events

        Returns:
        BBjNumber
      • ON_GRID_STATE_CHANGE

        public static BBjNumber ON_GRID_STATE_CHANGE()

        Constant value to define grid state changes

        Returns:
        BBjNumber
      • onGainedFocus

        public void onGainedFocus(BBjGainedFocusEvent ev!)

        Focus the grid by selecting the cell in the first cell and first column.

        Note: If the grid has already a different selected cell , then the event handler will retain the selection

        Parameters:
        BBjGainedFocusEvent ev! The focus event
      • onInit

        public void onInit(BBjEvent ev!)

        An Event listener executed after the initial load of the HTML View.

        At this phase the grid will inject all required js files in the client to make the grid functional.

        Parameters:
        BBjEvent ev! The onLoad event
      • onLoaded

        public void onLoaded(BBjEvent ev!)

        An Event listener executed after the second ON_PAGE_LOADED event

        At this phase the grid flush all enqueued scripts

        Parameters:
        BBjEvent ev! The onLoad event
      • onLoadedByTimer

        public void onLoadedByTimer(BBjEvent ev!)

        An Event listener for the fallback by timer

        Sporadically the ON_PAGE_LOADED event did not fire

        Parameters:
        BBjEvent ev! The onLoad event
      • onLoadedByWebManager

        public void onLoadedByWebManager(BBjEvent ev!)

        An Event listener for the loading the script by the WebManager

      • onNativeEvent

        public void onNativeEvent(BBjNativeJavaScriptEvent ev!)

        On NativeEvent

        Event Handler for Native JavaScript Event coming from the client Determines and dispatches the actual event

        Parameters:
        BBjNativeJavaScriptEvent ev! The Javascript Event
      • pinColumn

        public void pinColumn(BBjString field$, BBjString pin$)

        Pin a column of the grid to the left or the right margin


        #API

        Parameters:
        BBjString field$ The field name of the column
        BBjString pin$ The pin direction ("right" or "left")
        See Also:
        GxColumn.PINNED_LEFT()
        GxColumn.PINNED_RIGHT()
      • preferAsyncExecution

        public void preferAsyncExecution(BBjNumber enable!)

        When true then the executor will try to executes the JavaScript in the BBjHtmlView and returns immediately without waiting for a return value from the client.

        Enabling this option might boost the performance of the grid.

        Parameters:
        BBjNumber enable! true to enable , false to disable
      • redraw

        public void redraw(Boolean f_init!)

        @Override

        This method is called whenever the widget needs to be rendered

        Parameters:
        Boolean f_init! if TRUE then the control is rendered for the first time so this method has to perform initial rendering
      • redrawRows

        public void redrawRows()

        Gets the grid to remove a row from the DOM and recreate it again from scratch.

      • removeAlignedGrid

        public void removeAlignedGrid(BBjGridExWidget widget!)

        Disable the current grid alignment with the passed one

        Parameters:
        BBjGridExWidget widget!
      • removeChartToolbarItem

        public void removeChartToolbarItem(BBjString item!)

        Disable a chart toolbar item


        #Enterprise
        #Configuration
        #API

        See Also:
        CHART_TOOLBAR_SETTINGS()
        CHART_TOOLBAR_DATA()
        CHART_TOOLBAR_FORMAT()
        CHART_TOOLBAR_DOWNLOAD()
      • removeColumn

        public GxColumn removeColumn(BBjString field!)

        Remove a column definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's definition field
        Returns:
        GxColumn The removed column instance, null() otherwise
      • removeColumnGroup

        public GxColumnGroup removeColumnGroup(BBjString id!)

        Remove a column group definition


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString id! The column group definition id
        Returns:
        GxColumnGroup The removed column group instance, null() otherwise
      • removePivotColumns

        public void removePivotColumns(BBjString columns!)

        Disable pivot for columns.


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • removeRow

        public GxClientTransactionModel removeRow(DataRow row!)

        Remove a row from grid by the row reference


        #API

        Parameters:
        DataRow row! The data row object to remove
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • removeRow

        public GxClientTransactionModel removeRow(BBjNumber index!)

        Remove a row from grid by index


        #API

        Parameters:
        BBjNumber index! The row index
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • removeRow

        public GxClientTransactionModel removeRow(BBjString key!)

        Remove a row from grid by key


        #API

        Parameters:
        BBjString key! The row key
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • removeRowGroupColumns

        public void removeRowGroupColumns(BBjString columns!)

        Disable row grouping for columns.


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • removeStyle

        public Boolean removeStyle(BBjString selector$)

        Remove Style Block


        #API

        Parameters:
        selector$ : Css Selector
      • removeValueColumns

        public void removeValueColumns(BBjString columns!)

        Disable value for columns.


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • render

        public void render()

        Render the grid

        The method will compose the grid config and send it to the client for a full re-render. You can use this method to force the client render after you update a setup configuration (ex: column definitions)

      • resetAllColumns

        public void resetAllColumns()

        Clear all columns and column groups


        #Configuration
        #ColumnsRenderer

      • resetRowHeights

        public void resetRowHeights()

        Reset The row heights.


        #API

        The rows height is calculated once when the data is first given to the grid. If the data changes, or the width of a column changes, then you may require the grid to calculate the height again by calling this method

      • selectAll

        public void selectAll()

        select all rows


        #API

      • selectAll

        public void selectAll(BBjNumber x!)

        select all rows


        #API

        Parameters:
        BBJNumber x!: 0 select all, 1 select all filtered
      • setCallback

        public void setCallback(int type!, String callback!)

        Register an event handler

        Parameters:
        Int type! The event's type
        String callback! The event's callback
      • setCallback

        public void setCallback(int type!, CustomObject instance!, String method!)

        Register an event handler

        Parameters:
        Int type! The event's type
        CustomObject instance! class instance
        String method! method name
      • setColumnAggFunc

        public void setColumnAggFunc(BBjString field!, BBjString AggFunc!)

        Set an aggregation function for the passed column field


        #Enterprise
        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The column's field
        BBjString AggFunc! Name of function to use for aggregation. One of [sum, min, max, first, last].
      • setColumnAlignment

        public void setColumnAlignment(BBjString field!, BBjNumber align!)

        Sets the default alignment for a column


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The field name of the column definition
        BBjNumber align! The column alignment valid alignments:
        See Also:
        GRID_ALIGN_LEFT()
        GRID_ALIGN_CENTER()
        GRID_ALIGN_RIGHT()
      • setColumnBackColor

        public void setColumnBackColor(BBjString field$, BBjColor color!)

        Sets the background color of a column


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field$ The field name of the column definition
        BBjColor color! The color for the column
      • setColumnBackColor

        public void setColumnBackColor(BBjString field$, BBjString color!)

        Sets the background color of a column


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field$ The field name of the column definition
        BBjColor color$ Valid CSS color
        See Also:
        https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
      • setColumnForeColor

        public void setColumnForeColor(BBjString field$, BBjColor color!)

        Sets the foreground color for a column


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field$ The field name of the column definition
        BBjColor color! the color for the column
      • setColumnForeColor

        public void setColumnForeColor(BBjString field$, BBjString color!)

        Sets the foreground color for a column


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field$ The field name of the column definition
        BBjString color$ Valid CSS color
        See Also:
        https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
      • setColumnHeaderAlignment

        public void setColumnHeaderAlignment(BBjString field!, BBjNumber align!)

        Sets the default alignment for a column's header


        #Configuration
        #ColumnsRenderer

        Parameters:
        BBjString field! The field name of the column definition
        BBjNumber align! The column's header alignment valid alignments:
        See Also:
        GRID_ALIGN_LEFT()
        GRID_ALIGN_CENTER()
        GRID_ALIGN_RIGHT()
      • setColumnImageList

        public void setColumnImageList(BBjString field!, BBjImage imagelist!)

        Set an image list for a given column using GxRendererImageRenderer.


        #Configuration
        #ColumnsRenderer

        Note: This method will override the CellRenderer of the column. The column has to contain the values "1", "2", "3" to x to reference the slices in the BBjImage list

        Parameters:
        BBjString field! The column's field
        BBjImage imagelist! The image list containing the image sprites
      • setColumnMask

        public void setColumnMask(BBjString field!, BBjString mask!)

        Set the mask of a column using value formatter expression.


        #Configuration
        #ColumnsRenderer

        Note: This method will override the ValueFormatterExpression of the column.The method depends on the column type to determine the correct value formatter (number, date, ...)

        Parameters:
        field! - The column's field
        mask! - The BBj date string or numeric mask.
      • setColumnState

        public void setColumnState(GxState state!)

        Apply the grid's columns , sorbing and filtering state


        #API

        Parameters:
        GxState state! : the state object
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setColumnState(GxState state!) is deprecated / renamed. Use BBjGridExWidget.setState(GxState state!) instead.
      • setColumnVisible

        public void setColumnVisible(BBjString columns!, BBjNumber hidden!)

        Sets the visibility of column(s)

        Parameters:
        BBjString columns! A comma separated list of column ids to hide / show
        BBjNumber hidden! True to hide , false to show
      • setColumnVisible

        public void setColumnVisible(GxColumn column!, BBjNumber hidden!)

        Sets the visibility of a column

        Parameters:
        GxColumn column! The column definition
        BBjNumber hidden! True to hide , false to show
      • setColumnWidth

        public void setColumnWidth(BBjString field$, BBjNumber width!)

        Sets the width of a column


        #Configuration
        #API


        Note: Unlike setting the width in the column definition, this method will update a column width without a full re-render.
        Parameters:
        BBjString field$ The field name of the column definition
        BBjNumber width! The column width
      • setData

        public void setData(ResultSet rs!, BBjNumber render!, BBjNumber addAll!, BBjString indexdBy$)

        Feed the grid with data

        Parameters:
        ResultSet rs! ResultSet with the data
        BBjNumber render! When true the grid will render directly on the client, otherwise you need to call render() directly
        BBjNumber addAll! When true, We will create a column definition for every column in the ResultSet, otherwise update the existing ones only
        BBjString indexdBy$ The field used for creating the unique row index
        See Also:
        render()
      • setData

        public void setData(ResultSet rs!, BBjNumber render!, BBjNumber all!)

        Feed the grid with data

        The method will sync the result set column definitions with the current column definitions , update the data and render the grid on the client

        Parameters:
        ResultSet rs! ResultSet with the data
        BBjNumber render! When true the grid will render directly on the client, otherwise you need to call render() directly
        BBjNumber addAll! When true, We will create a column definition for every column in the ResultSet, otherwise update the existing ones only
        See Also:
        render()
      • setData

        public void setData(ResultSet rs!, BBjNumber render!)

        Feed the grid with data

        The method will sync the result set column definitions with the current column definitions , update the data and render the grid on the client

        Parameters:
        ResultSet rs! ResultSet with the data
        BBjNumber render! When true the grid will render directly on the client, otherwise you need to call render() directly
        See Also:
        render()
      • setData

        public void setData(ResultSet rs!, BBjString indexdBy$)

        Feed the grid with data

        Parameters:
        ResultSet rs! ResultSet with the data
        BBjString indexdBy$ The field used for creating the unique row index
      • setData

        public void setData(ResultSet rs!)

        Feed the grid with data

        The method will sync the result set column definitions with the current column definitions , update the data and render the grid on the client

        Parameters:
        ResultSet rs! ResultSet with the data
      • setDebug

        public static void setDebug(BBjNumber debug!, BBjNumber port!)

        Enable remote debugging on the given port

        Parameters:
        BBjNumber debug! true to enable debug , false otherwise
        BBjNumber port! the debugging port
        Returns:
        void
      • setDebug

        public static void setDebug(BBjNumber debug!)

        Enable remote debugging on the 9222 port

        Parameters:
        BBjNumber debug! true to enable debug , false otherwise
        Returns:
        void
      • setFilterModel

        public GxClientFilterModel setFilterModel(BBjString column!, GxClientFilterModel model!)

        Set and apply filter model for the given column

        Parameters:
        BBjString column! the column id
        GxClientFilterModel model! the model filter to use
        #API
        #Configuration
        Returns:
        GxClientFilterModel the passed model
      • setFitToGrid

        public void setFitToGrid()

        Make the currently visible columns fit the screen.

        The columns will scale (growing or shrinking) to fit the available width. If you don't want a particular column to be included in the auto resize, then set the column setting SuppressSizeToFit=true. This is helpful if, for example, you want the first column to remain fixed with, but all other columns to fill the width of the table.


        #API

      • setFitToGrid

        public void setFitToGrid(BBjNumber width!)

        Gets the grid to size the columns to the specified with


        #API

        Parameters:
        BBjNumber width! the width to use to fit all columns in
      • setFunctionsReadOnly

        public void setFunctionsReadOnly(BBjNumber readonly!)

        If true, then row group, pivot and value aggregation will be read only from the Ui. The grid will display what values are used for each, but will not allow the use to change the selection


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjNumber readonly! when true disable, enable otherwise
      • setPinnedBottomRows

        public void setPinnedBottomRows(ResultSet rs!)

        Set a result set of pinned rows on bottom

        Parameters:
        ResultSet rs! A ResultSet instance
      • setPinnedTopRows

        public void setPinnedTopRows(ResultSet rs!)

        Set a result set of pinned rows on top

        Parameters:
        ResultSet rs! A ResultSet instance
      • setPivotColumns

        public void setPivotColumns(BBjString columns!)

        Disable pivot for all columns and enable it for the passed columns


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • setPivotMode

        public void setPivotMode(BBjNumber mode!)

        Enable / disable pivot mode


        #Configuration
        #API

        Parameters:
        BBjNumber mode! when true, the pivot mode will be enabled, disabled otherwise
      • setQuickFilter

        public void setQuickFilter(BBjString filter!)

        Perform throw columns search


        #API

        Parameters:
        BBjNumber filter filter as number
      • setQuickFilter

        public void setQuickFilter(BBjNumber filter!)

        Perform throw columns search


        #API

        Parameters:
        BBjNumber filter! filter as a number
      • setRowData

        public GxClientTransactionModel setRowData(BBjNumber index!, DataRow row!)

        Update row data


        #API

        Parameters:
        BBjNumber index! The Row index
        DataRow row! DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setRowData(BBjNumber index!, DataRow row!) is deprecated. Use BBjGridExWidget.updateRow(DataRow row!) instead. The grid can work out the row index by its own
      • setRowData

        public GxClientTransactionModel setRowData(DataRow row!)

        Update row data


        #API

        Parameters:
        DataRow row! DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setRowData(DataRow row!) is deprecated. Use BBjGridExWidget.updateRow(DataRow row!) instead. The grid can work out the row index by its own
      • setRowGroupColumns

        public void setRowGroupColumns(BBjString columns!)

        Disable row grouping for all columns and enable it for the passed columns


        #Enterprise
        #Configuration
        #API

        Parameters:
        BBjString columns! A comma separated string of column fields
      • setRowHeight

        public void setRowHeight(BBjNumber height!)

        Set all rows height


        #API

        Parameters:
        BBjNumber height! - the new row height
      • setRowHeight

        public void setRowHeight(BBjString key!, BBjNumber height!)

        Set the given row height


        #API

        Parameters:
        BBjString key! - the row key
        BBjNumber height! - the new row height
      • setRowHeight

        public void setRowHeight(BBjNumber index!, BBjNumber height!)

        Set the given row height


        #API

        Parameters:
        BBjNumber index! - the row index
        BBjNumber height! - the new row height
      • setRowsData

        public void setRowsData(ResultSet rs!)

        Feed the grid with a new ResultSet

        Unlike the setData method, this one will update the grid with a new rows set(ResultSet) without doing a full re-render. The column definition will not be synced from the passed ResultSet in this case.

        Use this method in case you want to replace the whole data in the grid at once. Please note that All row and range selection will be lost.


        #API

        Parameters:
        ResultSet rs! ResultSet with the data
        See Also:
        setData()
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setRowsData(ResultSet rs!) is deprecated / renamed. Use BBjGridExWidget.updateData(ResultSet rs!) instead.
      • setSelectedRow

        public void setSelectedRow(BBjNumber index!)

        Select a row by its index


        #API

        Parameters:
        BBjNumber x!: the row index to select
      • setSelectedRow

        public void setSelectedRow(BBjString key!)

        Select a row by its key


        #API

        Parameters:
        BBjString x!: the row key to select
      • setSelectedRows

        public void setSelectedRows(BBjVector x!)

        Select a vector of rows. The vector can contain a mix of row indices and row keys


        #API

        Parameters:
        BBJNumber x!: vector of row indices and row keys to select
      • setSize

        public void setSize(BBjNumber w!, BBjNumber h!)

        setSize - set the size of the control


        #API

        Parameters:
        BBjNumber w! - width
        BBjNumber h! - height
      • setSortModel

        public void setSortModel(GxClientSortModel model!)

        Set a sorting for one or more columns


        #API

        Parameters:
        GxClientSortModel model! the sorting model
      • setStartCellEditing

        public void setStartCellEditing(BBjString key!, BBjString column!, BBjNumber keyPress!, BBjString charPress!, BBjString floating!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjString key! The row key
        BBjString column! The column ID
        BBjNumber keyPress! The key code to pass to the editor when the editor supports it
        BBjString charPress! The key char to pass to the editor when the editor supports it
        BBjString floating! The row floating (top , bottom or none)
        See Also:
        BBjGridExWidget.GRID_FLOATING_NONE()
        BBjGridExWidget.GRID_FLOATING_TOP()
        BBjGridExWidget.GRID_FLOATING_BOTTOM()
      • setStartCellEditing

        public void setStartCellEditing(BBjNumber index!, BBjString column!, BBjNumber keyPress!, BBjString charPress!, BBjString floating!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjNumber index! The row index
        BBjString column! The column ID
        BBjNumber keyPress! The key code to pass to the editor when the editor supports it
        BBjString charPress! The key char to pass to the editor when the editor supports it
        BBjString floating! The row floating (top , bottom or none)
        See Also:
        BBjGridExWidget.GRID_FLOATING_NONE()
        BBjGridExWidget.GRID_FLOATING_TOP()
        BBjGridExWidget.GRID_FLOATING_BOTTOM()
      • setStartCellEditing

        public void setStartCellEditing(BBjString key!, BBjString column!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjString key! The row key
        BBjString column! The column ID
      • setStartCellEditing

        public void setStartCellEditing(BBjNumber index!, BBjString column!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjNumber index! The row index
        BBjString column! The column ID
      • setStartCellEditing

        public void setStartCellEditing(BBjString key!, BBjString column!, BBjString charPress!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjString key! The row key
        BBjString column! The column ID
        BBjString charPress! The key char to pass to the editor when the editor supports it
      • setStartCellEditing

        public void setStartCellEditing(BBjNumber index!, BBjString column!, BBjString charPress!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjNumber index! The row index
        BBjString column! The column ID
        BBjString charPress! The key char to pass to the editor when the editor supports it
      • setStartCellEditing

        public void setStartCellEditing(BBjString key!, BBjString column!, BBjNumber keyPress!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjString key! The row key
        BBjString column! The column ID
        BBjNumber keyPress! The key code to pass to the editor when the editor supports it
      • setStartCellEditing

        public void setStartCellEditing(BBjNumber index!, BBjString column!, BBjNumber keyPress!)

        Start Cell Editing at the given row and column


        #API

        Parameters:
        BBjNumber index! The row index
        BBjString column! The column ID
        BBjNumber keyPress! The key code to pass to the editor when the editor supports it
      • setState

        public void setState(GxState state!)

        Apply the grid's columns , sorbing and filtering state


        #API

        Parameters:
        GxState state! : the state object
      • setTheme

        public void setTheme(BBjString theme$)

        Set the grid theme


        #Configuration
        #API

        Parameters:
        BBjString theme$
        See Also:
        getThemes()
        GRID_THEME_BALHAM()
        GRID_THEME_BALHAM_DARK()
        GRID_THEME_MATERIAL()
      • setVisibleColumn

        public void setVisibleColumn(BBjString columnId!)

        Ensures the column is visible, scrolling the table if needed.


        #API

        Parameters:
        BBJString columnid!: the column id
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setVisibleColumn(BBjString columnId!) is deprecated / renamed. Use BBjGridExWidget.ensureColumnVisible(BBjString columnId!) instead.
      • setVisibleRow

        public void setVisibleRow(BBjNumber index!, BBjString position!)

        Ensures the row index is visible by vertically scrolling the grid

        Ensures the row index is visible by vertically scrolling the grid. The valid values for positions are {'top', 'middle', 'bottom'}. If top, middle or bottom, the grid will scroll the row to place the row at top, middle or bottom


        #API

        Parameters:
        BBjNumber index!: the row index
        BBjString position!: the scrolling position
        See Also:
        GRID_ROWPOS_TOP()
        GRID_ROWPOS_MIDDLE()
        GRID_ROWPOS_BOTTOM()
        Deprecated:
        since version 0.101.0, BBjGridExWidget.setVisibleRow(BBjNumber index! , BBjString position!) is deprecated / renamed. Use BBjGridExWidget.ensureIndexVisible(BBjNumber index! , BBjString position!) instead.
      • showLoadingOverlay

        public void showLoadingOverlay()

        Show loading overlay


        #API

      • showNoRowsOverlay

        public void showNoRowsOverlay()

        Show 'no rows' overlay


        #API

      • sortColumn

        public void sortColumn(BBjString column!, BBjString direction!)

        Sort the given column with the given direction


        #API

        Parameters:
        BBjString column! The column id
        BBjString direction! The sort direction
        See Also:
        setSortModel
      • startNextCellEditing

        public void startNextCellEditing()

        Navigates the grid focus to the next cell, as if tabbing.


        #API

        Deprecated:
        since version 0.101.0, BBjGridExWidget.startNextCellEditing() is deprecated / renamed. Use BBjGridExWidget.tabToNextCell() instead.
      • startPreviousCellEditing

        public void startPreviousCellEditing()

        Navigates the grid focus to the previous cell, as if shift-tabbing.


        #API

        Deprecated:
        since version 0.101.0, BBjGridExWidget.startPreviousCellEditing() is deprecated / renamed. Use BBjGridExWidget.tabToPreviousCell() instead.
      • stopEditing

        public void stopEditing()

        Stop editing and accepts changes


        #API

      • stopEditing

        public void stopEditing(BBjNumber cancel!)

        Stop Editing


        #API

        Parameters:
        BBjNumber cancel!: 1 = discard changes, 0 = accept changes
      • suppressBuiDebouncing

        public void suppressBuiDebouncing(BBjNumber suppress!)

        When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.

        Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI context

        By default this options is set to "0"

        Parameters:
        BBjNumber suppress! true to suppress , false to enable
        Deprecated:
        Use `setSuppressWebDebouncing` instead
      • suppressDebouncing

        public void suppressDebouncing(BBjNumber suppress!)

        Suppress scripts debouncing for GUI and BUI

        Parameters:
        BBjNumber suppress! true to suppress , false to enable
        See Also:
        #suppressWebDebouncing()
        #suppressGuiDebouncing()
      • suppressGuiDebouncing

        public void suppressGuiDebouncing(BBjNumber suppress!)

        When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.

        Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in GUI context

        By default this options is set to "1"

        Parameters:
        BBjNumber suppress! true to suppress , false to enable
      • suppressWebDebouncing

        public void suppressWebDebouncing(BBjNumber suppress!)

        When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.

        Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI & DWC context

        By default this options is set to "0"

        Parameters:
        BBjNumber suppress! true to suppress , false to enable
      • tabToNextCell

        public void tabToNextCell()

        Navigates the grid focus to the next cell, as if tabbing.


        #API

      • tabToPreviousCell

        public void tabToPreviousCell()

        Navigates the grid focus to the previous cell, as if shift-tabbing.


        #API

      • updateColumns

        public void updateColumns()

        Re-render the column definitions on the client.


        #API

        The method will collect the new changes in columns and column groups and force the client to reflect the change.

      • updateContext

        public void updateContext()

        Force the context object update

      • updateData

        public void updateData(ResultSet rs!)

        Feed the grid with a new ResultSet

        Unlike the setData method, this one will update the grid with a new rows set(ResultSet) without doing a full re-render. The column definition will not be synced from the passed ResultSet in this case.

        Use this method in case you want to replace the whole data in the grid at once. Please note that All row and range selection will be lost.


        #API

        Parameters:
        ResultSet rs! ResultSet with the data
        See Also:
        setData()
      • updateRow

        public GxClientTransactionModel updateRow(DataRow row!)

        Update row data


        #API

        Parameters:
        DataRow row! DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
      • updateRow

        public GxClientTransactionModel updateRow(BBjNumber index!, DataRow row!)

        Update row data


        #API

        Parameters:
        BBjNumber index! The Row index
        DataRow row! DataRow object which contains the update
        Returns:
        GxClientTransactionModel the transaction object which used to achieve the update
        Deprecated:
        since version 0.101.0, BBjGridExWidget.updateRow(BBjNumber index!, DataRow row!) is deprecated. Use BBjGridExWidget.updateRow(DataRow row!) instead. The grid can work out the row index by its own