Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Advanced Selections Features #8

Closed
StephanWald opened this issue Jan 16, 2018 · 6 comments
Closed

Implement Advanced Selections Features #8

StephanWald opened this issue Jan 16, 2018 · 6 comments
Assignees

Comments

@StephanWald
Copy link

No description provided.

@hyyan
Copy link
Member

hyyan commented Jan 16, 2018

@StephanWald

Two new methods have been added to select one or more rows on the grid

setSelectedRow(BBjNumber x!)
setSelectedRows(BBjVector x!)

Obveiously setSelectedRows needs GRID_SELECT_ROW mode in order to work, otherwise only the last index in the array (vector) will be selected (no errors or warnings will be thrown )

Example

grid! = new BBjGridExWidget(wnd!,100,0,35,900,563)
grid!.setSelectionMode(grid!.GRID_SELECT_ROW())
grid!.setMultipleSelection(1)

/** selects row 5**/
grid!.setSelectedRow(5)


/** selectes multi rows [2,4,5] */
 v! = new BBjVector()
 v!.addItem(2)
 v!.addItem(4)
 v!.addItem(6)   
 grid!.setSelectedRows(v!)

@hyyan
Copy link
Member

hyyan commented Jan 17, 2018

@StephanWald Added two new methods to improve selection:

Methods

setGroupSelectsChildren

When true, selecting a group will have the impact of selecting all its children
When false, then the group is selectable independently of the child nodes

seShowSelectionCheckbox

When true, selection box will be shown in the first column
When false, no checkbox will be displayed.

Example

grid! = new BBjGridExWidget(wnd!,100,0,35,900,563)

grid!.setEnableFilter(1)
grid!.setMultipleSelection(1)
grid!.setSelectionMode(grid!.GRID_SELECT_ROW())
grid!.setGroupSelectsChildren(1)
grid!.seShowSelectionCheckbox(1)

1

2

@hyyan hyyan changed the title implement setSelectedRow() ~~implement setSelectedRow()~~ Jan 17, 2018
@hyyan hyyan changed the title ~~implement setSelectedRow()~~ Implement Advanced Selections Features Jan 17, 2018
hyyan added a commit that referenced this issue Jan 17, 2018
hyyan added a commit that referenced this issue Jan 17, 2018
hyyan added a commit that referenced this issue Jan 17, 2018
hyyan added a commit that referenced this issue Jan 17, 2018
@hyyan
Copy link
Member

hyyan commented Jan 17, 2018

@StephanWald
Added the ability to select/deselect data

Methods

selectAll
Will select all data, if the filtered param is passed then only filtered data will be selected

deselectAll
Will deselect all data, if the filtered param is passed then only filtered data will be deselected

Example

grid! = new BBjGridExWidget(wnd!,100,0,35,900,563)
grid!.selectAll()
/** do some filtering from the grid  */
grid!.deselectAll(1)

@hyyan
Copy link
Member

hyyan commented Jan 17, 2018

@StephanWald

Added the ability to collapse and expand groups

Methods

  1. collapseAll
  2. expandAll

Example

grid! = new BBjGridExWidget(wnd!,100,0,35,900,563)
grid!.exapndAll()
grid!.collapseAll()

@hyyan
Copy link
Member

hyyan commented Jan 17, 2018

@StephanWald

Added two new method to set visible row/column

Methods

  1. setVisibleRow(BBjNumber index! , BBjString position!)
    Ensures the row index is visible by vertically scrolling the grid. The valid values for positions are {'top', 'middle', 'bottom', undefined/null}. If top, middle or bottom, the grid will scroll the row to place the row at top, middle or bottom.

  2. setVisibleColumn(BBjString columnId!)
    Ensures the column is visible, scrolling the table if needed.

Example

grid! = new BBjGridExWidget(wnd!,100,0,35,900,563)
grid!.setVisibleColumn("CUSTOMERID")
grid!.setVisibleRow(50 , grid!.GRID_ROWPOS_MIDDLE())

@StephanWald
Copy link
Author

closing this very broad one; everything that is still missing should become a separate issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants