Use cWebView.pkg Use cWebPanel.pkg Use cWebForm.pkg Use cCustomerDataDictionary.DD Use csfWebList.pkg Use csfWebColumn.pkg Use csfWebColumnButton.pkg Use cJsonObject.pkg Use cWebButton.pkg Use CustomerEdit.wo Object oSyncFusionGridCustomerList is a cWebView Set psCaption to "SyncFusion Grid Customer table (db enabled)" // Your DDO structure will go here Object oCustomer_DD Is a cCustomerDataDictionary End_Object Set Main_DD to oCustomer_DD Set Server to oCustomer_DD Object oWebMainPanel is a cWebPanel Set piColumnCount to 12 // place controls here. // Your view will grow as controls are added Object oForm is a cWebForm Set piColumnSpan to 2 Set psLabel to "Label 1:" End_Object Object oWebButton1 is a cWebButton Set piColumnSpan to 1 Set piColumnIndex to 3 Set psCaption to "get zip" Procedure OnClick String sValue // test if this is read from db before show (probably not) WebGet psValue of oCustomer_Zip to sValue Send ShowInfoBox ("customer zip ="+sValue) End_Procedure End_Object Object oNewRowLabel is a cWebLabel Set psCaption to "Change Row Label" Set piColumnSpan to 3 Set piColumnIndex to 4 End_Object Object oHintLabel is a cWebLabel Set psCaption to "Double click=enabled" Set piColumnSpan to 3 Set piColumnIndex to 7 End_Object Object oSelectedRowsButton is a cWebButton Set psCaption to "Selected Rows" Set piColumnIndex to 10 Set piColumnSpan to 2 Procedure OnClick Send GetRowSelection of oCustomerWebGrid // This triggers onSelectedRows in the grid with the actual selection. End_Procedure End_Object Object oCustomerWebGrid is a csfWebList Set piColumnIndex to 0 Set piColumnSpan to 12 Set piHeight To 400 Set pbShowToolBar To False Set pbAllowResizing To True Set pbAllowReordering To True Set pbAllowGrouping To True Set pbAllowSorting To True Set pbAllowExcelExport To True Set pbAllowPdfExport To True Set pbAllowFiltering To True Set pbServerOnRowDoubleClick to True Set pbMultipleSelection to True Procedure OnRowDoubleClick String sRowID Send ShowInfoBox ("RowID is"*sRowID) End_Procedure Procedure OnChangeCurrentRow String sFromRowID String sToRowID String sName WebGet psValue of oCustomer_Name To sName WebSet psCaption of oNewRowLabel to ("Row: "+sName) End_Procedure Procedure OnSelectedRows String[] RowIDs Send none End_Procedure Object oCustomer_Customer_Number is a csfWebColumn Entry_Item Customer.Customer_Number Set psCaption To "Number" Set piWidth to 50 End_Object Object oCustomer_Name is a csfWebColumn //cWebColumn (trigger DAWs error) Entry_Item Customer.Name Set psCaption to "Customer Name" Set piWidth To 196 Set psTooltip to "This is a customer name" End_Object Object oCustomer_State is a csfWebColumn Entry_Item Customer.State //Set psCaption to "St." Set psField To "State" // test with simple header tooltip, we can add this automatically if needed. Set psHeaderTemplate To 'St.' Set piWidth to 77 End_Object Object oCustomer_Zip is a csfWebColumn Entry_Item Customer.Zip Set psCaption to "Zip" Set piWidth To 71 // tested and works //Set pbVisible To False End_Object Object oCustomer_Balance is a csfWebColumn Entry_Item Customer.Balance Set psCaption to "Balance" Set piWidth to 50 //Set psFormat to "C4" End_Object Object oCustomer_Status is a csfWebColumnCheckbox Entry_Item Customer.Status Set psCaption to "Active?" Set piWidth to 50 End_Object Object oActionButtons is a csfWebColumnButton Set piWidth to 100 Set psCaption to "Dynamic buttons" Set pbDynamic to True Procedure OnClick String sButton String sRowId Forward Send OnClick sButton sRowId If (sButton="E") Begin //Move "Edit" to sButton Send PopupTheDialog of oCustomerEdit Self sRowID End Else If (sButton="D") Begin Move "Deactivate" to sButton Send ShowInfoBox ("button clicked "+sButton ) End End_Procedure Procedure OnCloseModalDialog Handle hoModalDialog String sResult Get DialogResult of hoModalDialog to sResult End_Procedure // Called for each row to define the buttons that need to be displayed. Procedure OnDefineButtons // Use AddButton to define a button (sID, sCaption, sCSSClass) Send AddButton "E" "Edit" "" // The Global buffer contains the right record for data aware lists If (Customer.Status = "Y") Begin Send AddButton "D" "Deactivate" "" End End_Procedure End_Object End_Object End_Object End_Object