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

[Bug] Grid does not correctly startCellEditing im DWC/BUI #246

Closed
TimonGeisbauer opened this issue Sep 30, 2022 · 1 comment
Closed

[Bug] Grid does not correctly startCellEditing im DWC/BUI #246

TimonGeisbauer opened this issue Sep 30, 2022 · 1 comment
Assignees
Labels
Type: Duplicate The issue is a duplicate of another feature request or bug report

Comments

@TimonGeisbauer
Copy link

In this Sample you have a pinned Row where you can start editing and tab trough all the columns.
Once you reached the end the code in the onEditingCompleted i set the first column visible again and then
start the CellEditing again. The cell editing works fine in guy but does not work in DWC/BUI.
The Cell gets the Styling as if editable but if you try to type nothing happens and also there is no cursor visible in the cell.
Adding a grid!.focus() as it is in this sample does not help in DWC/BUI and is not necessary for it to work in the GUI.

use ::BBjGridExWidget/BBjGridExWidget.bbj::BBjGridExWidget
use com.basiscomponents.db.ResultSet
use com.basiscomponents.db.DataRow

use ::BBjGridExWidget/GxColumns.bbj::GxColumn
use ::BBjGridExWidget/GxClientEvents.bbj::GxClientEventsCell

sysgui! = BBjAPI().openSysGui("X0")
wnd! = sysgui!.addWindow(0,0,800,600,"GridExSample")

wnd!.setCallback(BBjAPI.ON_CLOSE,"byebye")
grid! = new BBjGridExWidget(wnd!,9876,0,0,wnd!.getWidth(),wnd!.getHeight())
grid!.setCallback(grid!.ON_GRID_CELL_EDITING_STOPPED(),"onEditingCompleted")

rem grid!.getOptions().setStopEditingWhenGridLosesFocus(1)

c! = new GxColumn("1_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("2_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("3_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("4_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("5_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("6_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("7_")
c!.setEditable(1)
grid!.addColumn(c!)
c! = new GxColumn("8_")
c!.setEditable(1)
grid!.addColumn(c!)

dr! = new DataRow()
dr!.setFieldValue("__INDEX__","0123456789")
for i = 1 to 8 
dr!.setFieldValue(str(i) + "_","")
next i

rs! = new ResultSet()
rs!.add(dr!)
grid!.setPinnedBottomRows(rs!)

data! = new ResultSet()
entry! = new DataRow()
entry!.setFieldValue("1_","test")
entry!.setFieldValue("2_","test")
entry!.setFieldValue("3_","test")
entry!.setFieldValue("4_","test")
entry!.setFieldValue("5_","test")
entry!.setFieldValue("6_","test")
entry!.setFieldValue("7_","test")
entry!.setFieldValue("8_","test")
data!.add(entry!)

grid!.setData(data!)

process_events

onEditingCompleted:
ev! = BBjAPI().getLastEvent()
declare auto GxClientEventsCell cell!
declare DataRow dr!

declare BBjString cname!

cell! = ev!.getObject()
cname! = cell!.getColumn().getName()

if (cname! = "8_") then 
    grid!.setVisibleColumn("1_")
    grid!.setStartCellEditing(0,"1_",-1,"",grid!.GRID_FLOATING_BOTTOM())
    grid!.focus(0,"1_",grid!.GRID_FLOATING_BOTTOM())
endif

return
@hyyan hyyan added the Type: Duplicate The issue is a duplicate of another feature request or bug report label Oct 25, 2022
@hyyan
Copy link
Member

hyyan commented Oct 25, 2022

Duplicate of #245

@hyyan hyyan marked this as a duplicate of #245 Oct 25, 2022
@hyyan hyyan closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate The issue is a duplicate of another feature request or bug report
Projects
None yet
Development

No branches or pull requests

2 participants