Skip to content

Commit

Permalink
Treat rowindex as a String
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Jul 9, 2018
1 parent 1838409 commit 2ebbd98
Show file tree
Hide file tree
Showing 8 changed files with 2,479 additions and 22 deletions.
11 changes: 5 additions & 6 deletions BBjGridExWidget.bbj
Expand Up @@ -1591,7 +1591,7 @@ class public BBjGridExWidget extends BBjWidget
row! = new BBjGridExWidgetRow(#RS!)
row!.setId(next!.get("id").getAsString())
row!.setChildIndex(next!.get("childIndex").getAsInt())
row!.setIndex(next!.get("index").getAsInt())
row!.setIndex(next!.get("index").getAsString())
row!.setParentKey(next!.get("parentKey").getAsString())
row!.setIsSelected(iff(next!.get("selected").getAsString() = "true" , 1 , 0))
rows!.add( row!)
Expand Down Expand Up @@ -1626,7 +1626,7 @@ class public BBjGridExWidget extends BBjWidget
row! = new BBjGridExWidgetRow(#RS!)
row!.setId(rowAsJson!.get("id").getAsString())
row!.setChildIndex(rowAsJson!.get("childIndex").getAsInt())
row!.setIndex(rowAsJson!.get("index").getAsInt())
row!.setIndex(rowAsJson!.get("index").getAsString())
row!.setParentKey(rowAsJson!.get("parentKey").getAsString())
row!.setIsSelected(iff(rowAsJson!.get("selected").getAsString() = "true" , 1 , 0))
event! = new BBjGridWidgetCellEditingEvent()
Expand All @@ -1643,7 +1643,7 @@ class public BBjGridExWidget extends BBjWidget
row! = new BBjGridExWidgetRow(#RS!)
row!.setId(next!.get("id").getAsString())
row!.setChildIndex(next!.get("childIndex").getAsInt())
row!.setIndex(next!.get("index").getAsInt())
row!.setIndex(next!.get("index").getAsString())
row!.setParentKey(next!.get("parentKey").getAsString())
row!.setIsSelected(iff(next!.get("selected").getAsString() = "true" , 1 , 0))
event! = new BBjGridExWidgetDoubleClickRowEvent()
Expand Down Expand Up @@ -1761,7 +1761,6 @@ class public BBjGridExWidget extends BBjWidget
FI
FI


cdef! = new JsonArray()
first=1

Expand Down Expand Up @@ -1943,7 +1942,7 @@ classend
class public BBjGridExWidgetRow

field public BBjString Id!
field public BBjNumber Index!
field public BBjString Index!
field public BBjNumber ChildIndex!
field public BBjString ParentKey!
field public BBjNumber IsSelected!
Expand All @@ -1959,7 +1958,7 @@ class public BBjGridExWidgetRow
methodend

method public DataRow asDataRow()
methodret #RS!.getItem(#Index!)
methodret #RS!.get(#Index!)
methodend

method public JsonObject getData()
Expand Down
2 changes: 1 addition & 1 deletion Demo/CD-Store.bbj
Expand Up @@ -41,4 +41,4 @@ ev! = BBjAPI().getLastEvent()
w=ev!.getWidth()
h=ev!.getHeight()
grid!.setSize(w,h)
return
return
2 changes: 1 addition & 1 deletion Demo/SelectionDemo.bbj
Expand Up @@ -45,7 +45,7 @@ fillGrid:
sbc! = new SqlQueryBC(BBjAPI().getJDBCConnection("CDStore"))
rs! = sbc!.retrieve("SELECT * FROM CDINVENTORY")

grid!.setData(rs!,"CDNUMBER")
grid!.setData(rs!)

return

Expand Down
2 changes: 1 addition & 1 deletion Demo/TwoGridsDemo.bbj
Expand Up @@ -49,7 +49,7 @@ resize:
return

showDetails:
rec! = grid!.getSelectedRowInfo().asDataRow()
rec! = grid!.getSelectedRow().asDataRow()
cust$=rec!.getFieldAsString("CUST_NUM")

dsbc! = new SqlQueryBC(BBjAPI().getJDBCConnection("ChileCompany"))
Expand Down
13 changes: 2 additions & 11 deletions js/dist/bbj-grid-widget.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/report.html

Large diffs are not rendered by default.

0 comments on commit 2ebbd98

Please sign in to comment.