Interface MultiSourceEvent::getDataBoundGrid

Description

In BBj 7.0 and higher, this method calls SysGuiEvent::getControl() and casts the return value to a BBjDataBoundGrid.

Syntax

Return Value

Method

BBjDataBoundGrid

getDataBoundGrid()

Parameters

None.

Return Value

Returns the BBjDataBoundGrid that is the source of the event.

Remarks

If the source of the event is not a BBjDataBoundGrid, then this method will throw an !ERROR=26.

Example

rem ' Interface MultiSourceEvent::getDataBoundGrid Example

rem ' MultiSourceEvent
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(25,25,400,400,"MultiSourceEvent",$00090083$)
window!.setCallback(BBjWindow.ON_CLOSE,"eoj")
cedit! = window!.addCEdit(101,25,25,350,200,"BBjCEdit",$8106$)
cedit!.setCallback(BBjCEdit.ON_GAINED_FOCUS,"cedit")
editbox! = window!.addEditBox(102,25,250,350,25,"BBjEditBox",$$)
editbox!.setCallback(BBjEditBox.ON_GAINED_FOCUS,"editbox")
button! = window!.addButton(103,25,300,350,25,"BBjButton",$$)
button!.setCallback(BBjButton.ON_GAINED_FOCUS,"button")
process_events

eoj:
release

cedit:
    event! = sysgui!.getLastEvent()
    control! = event!.getCEdit()
    print "BBjCEdit gained focus"
return

editbox:
    event! = sysgui!.getLastEvent()
    control! = event!.getEditBox()
    print "BBjEditBox gained focus"
return

button:
    event! = sysgui!.getLastEvent()
    control! = event!.getButton()
    print "BBjButton gained focus"
return

See Also

BBjAPI

BBjSysGuiEvent::getControl

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.