Use cWebView.pkg
Use cWebPanel.pkg
Use cWebForm.pkg
Use cSalesPersonDataDictionary.dd
Use csfWebList.pkg
Use csfWebColumnLink.pkg
Use csfWebColumnButton.pkg
Use cWebButton.pkg
Use cWebGroup.pkg
Object oSyncFusionGridSalesRowTemplate is a cWebView
Set psCaption to "SyncFusion Sales List (rowTemplate)"
Set piWidth to 900
Object oSalesPerson_DD Is a cSalesPersonDataDictionary
End_Object
Set Main_DD to oSalesPerson_DD
Set Server to oSalesPerson_DD
// Your DDO structure will go here
Object oWebMainPanel is a cWebPanel
Set piColumnCount to 14
Object oGrid is a csfWebList
Set piColumnIndex to 0
Set piColumnSpan to 12
Set pbAllowSorting To True
Set pbFillHeight To true
Set pbEnableAltRow to False
// enable for onRowClick event
Set pbServerOnRowClick To True
Set psRowTemplate to """
|
|
"""
Object oSalesPerson_Avatar is a csfWebColumn
Entry_Item SalesPerson.Avatar
Set piWidth To 40
Set psField to "SalesAvatar"
End_Object
Object oSalesPerson_Name is a csfWebColumn
Entry_Item SalesPerson.Name
Set psCaption to "Person"
Set psField to "SalesName"
Set piWidth To 50
End_Object
Object oSalesPerson_ID is a csfWebColumn
Entry_Item SalesPerson.ID
Set psCaption to "ID"
Set piWidth To 0
Set psField to "SalesId"
End_Object
Send AddToolBarItem "Search"
Procedure OnRowClick String sRowID
//send ShowInfoBox ("row clicked "+sRowID) "Single click"
End_Procedure
Procedure OnRowSelected
//send ShowInfoBox "row selected"
End_Procedure
Procedure OnRowDoubleClick String sRowID
send ShowInfoBox "row double clicked"
End_Procedure
Procedure ShowRowID
String sRowID
WebGet psCurrentRowId to sRowID
send ShowInfoBox ("current row = "+sRowID) "show me"
End_Procedure
End_Object
Object oOptionsWebGroup is a cWebGroup
Set psCaption to "Options (these don't work on a rowtemplate)"
Set piColumnSpan to 2
Set piColumnCount to 2
Set piColumnIndex to 12
Set pbFillHeight to True
Object oRefreshGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "refresh"
Procedure OnClick
Send RefreshGrid of oGrid
End_Procedure
End_Object
Object oTestGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "test"
Procedure OnClick
String[] aParams
//Send TestGrid of oGrid
Move "13" To aParams[0]
Move "This is a test for the 'showControlError' function." To aParams[1]
Send ClientAction of oSalesPerson_Name "showControlError" aParams
End_Procedure
End_Object
Object oShowRowIDGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "RowID="
Procedure OnClick
Send ShowRowID of oGrid
End_Procedure
End_Object
Object oRowUpGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "Up"
Procedure OnClick
Send MoveUpRow of oGrid
End_Procedure
End_Object
Object oRowDownGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "Down"
Procedure OnClick
Send MoveDownRow of oGrid
End_Procedure
End_Object
Object oBeginGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "First"
Procedure OnClick
Send MoveToFirstRow of oGrid
End_Procedure
End_Object
Object oEndGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "Last"
Procedure OnClick
Send MoveToLastRow of oGrid
End_Procedure
End_Object
Object oGetNameGridBtn is a cWebButton
Set piColumnIndex to 0
Set piColumnSpan to 2
Set psCaption to "Get Name"
Procedure OnClick
String sValue
WebGet psValue Of oSalesPerson_Name To sValue
send ShowInfoBox ("name ="*sValue)
End_Procedure
End_Object
End_Object
End_Object
End_Object