Skip to content

Commit

Permalink
feat: add getRow api method
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed May 4, 2020
1 parent b7512d1 commit 7b89376
Show file tree
Hide file tree
Showing 6 changed files with 15,146 additions and 11,773 deletions.
21 changes: 21 additions & 0 deletions BBjGridExWidget.bbj
Expand Up @@ -2433,6 +2433,27 @@ class public BBjGridExWidget extends BBjWidget implements GxColumnsManagerInterf
methodret rows!
methodend
rem /**
rem * Returns the row with the given key from the grid.
rem *
rem * <b>Note : </b> if you only need to get the row and
rem * you don't care about other meta data like parent(when grouping) , isSelected,... then use the
rem * ResultSet API (ex ResultSet.getItem(BBjString key!) )
rem *
rem * @param BBjString key! the row's key
rem *
rem * @return GxClientRowModel the grid's row model
rem *
rem * @see <a href"https://basishub.github.io/components/javadoc/com/basiscomponents/db/ResultSet.html#getItem-int-">ResultSet.getItem</a>
rem */
method public GxClientRowModel getRow(BBjString key!)
returnedRow! = #getExecutor().execute("$wnd.gw_getRow('" + #GRIDID$ + "','" + key! + "')" , 0)
if returnedRow! <> null() and len(returnedRow!) > 0 then
methodret #getClientJsonFactory().getRow(returnedRow!)
FI

methodret null()
methodend
rem /**
rem * Get the rows from grid in the given phase after applying the given
rem * filter expression.
rem *
Expand Down

0 comments on commit 7b89376

Please sign in to comment.