Skip to content

Commit

Permalink
Resolve issue #8 - Add 'setVisibleColumn' method
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Jan 17, 2018
1 parent c79a040 commit 359cd7b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions BBjGridExWidget.bbj
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@ class public BBjGridExWidget extends BBjWidget
#executeScript(script$)
methodend

rem /**
rem * set visible column
rem *
rem * Ensures the column is visible, scrolling the table if needed.
rem *
rem * @param BBJString columnid!: the column id
rem */
method public void setVisibleColumn(BBjString columnId!)

script$="bbj_grid_widget_set_visible_column('" + columnId! + "');"
#executeScript(script$)
methodend

rem /**
rem * Event Handler for Native JavaScript Event (from the Grid)
rem * Determines and dispatches the actual event
Expand Down
4 changes: 4 additions & 0 deletions js/BBjGridExWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ function bbj_grid_widget_set_visible_row(index,position){
$doc.bbj_grid_widget.api.ensureIndexVisible(index,position);
}

function bbj_grid_widget_set_visible_column(columnId) {
$doc.bbj_grid_widget.api.ensureColumnVisible(columnId);
}

function bbj_grid_widget_get_state() {

var state = $doc.bbj_grid_widget.columnApi.getColumnState();
Expand Down

0 comments on commit 359cd7b

Please sign in to comment.