Skip to content

Commit

Permalink
introduced asDataRow to return row info in datarow format
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Wald committed Mar 7, 2018
1 parent 41107b8 commit 5091211
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions BBjGridExWidget.bbj
Expand Up @@ -24,6 +24,12 @@ class public BBjGridExWidgetRow
method public String toString()
methodret #Id!
methodend

method public DataRow asDataRow()

methodret DataRow.fromJson(#Data!.toString())

methodend
classend

class public BBjGridExWidgetSelectRowEvent
Expand Down
6 changes: 1 addition & 5 deletions Demo/TwoGridsDemo.bbj
Expand Up @@ -49,15 +49,11 @@ resize:
return

showDetails:
ev! = BBjAPI().getLastEvent()
data$= ev!.getObject().getRows().getItem(0).getData().toString()
rec! = DataRow.fromJson(data$)
rec! = grid!.getSelectedRowInfo().asDataRow()
cust$=rec!.getFieldAsString("CUST_NUM")

dsbc! = new SqlQueryBC(BBjAPI().getJDBCConnection("ChileCompany"))
drs! = dsbc!.retrieve("SELECT * FROM ORDER_HEADER WHERE CUST_NUM='"+cust$+"'")
dtlgrid!.setData(drs!)


return

0 comments on commit 5091211

Please sign in to comment.