Use cWebView.pkg Use cWebPanel.pkg Use cWebForm.pkg Use csfWebList.pkg Use csfWebColumn.pkg Use csfWebColumnLink.pkg Use csfWebColumnImage.pkg Use cCustomerDataDictionary.dd Use cSalesPersonDataDictionary.dd Use cOrderHeaderDataDictionary.dd Use cOrderDetailDataDictionary.dd Object oSyncFusionOrderList is a cWebView Set psCaption to "Orders" Object oCustomerDataDictionary is a cCustomerDataDictionary End_Object Object oSalesPersonDataDictionary is a cSalesPersonDataDictionary End_Object Object oOrderHeaderDataDictionary is a cOrderHeaderDataDictionary Set DDO_Server to oCustomerDataDictionary Set DDO_Server to oSalesPersonDataDictionary End_Object Set Main_DD to oOrderHeaderDataDictionary Set Server to oOrderHeaderDataDictionary Object oWebMainPanel is a cWebPanel Set piColumnCount to 12 Object oWebButton1 is a cWebButton Set piColumnSpan to 2 Set piColumnIndex to 0 Set psCaption to "reset Layout" Set psToolTip to "You will need to reload this page to get it to reset" Procedure OnClick // this only partly works, you'll have to reload the page as there's too // many problems in getting this to work (grouping, ordering.. ) Send ResetLayout of oOrders End_Procedure End_Object Object oWebButton2 is a cWebButton Set piColumnSpan to 2 Set piColumnIndex to 2 Set psCaption to "refresh" Procedure OnClick Send RefreshGrid of oOrders End_Procedure End_Object Object oWebButton3 is a cWebButton Set piColumnSpan to 2 Set piColumnIndex to 4 Set psCaption to "toolbar" Procedure OnClick Boolean bShow WebGet pbShowGroupSettingsDropArea of oOrders to bShow WebSet pbShowGroupSettingsDropArea of oOrders to (not(bShow)) End_Procedure End_Object Object oWebButton4 is a cWebButton Set piColumnSpan to 2 Set piColumnIndex to 6 Set psCaption to "Show grouped column" Procedure OnClick Boolean bShow WebGet pbShowGroupedColumn of oOrders to bShow WebSet pbShowGroupedColumn of oOrders to (not(bShow)) End_Procedure End_Object Object oHintLabel is a cWebLabel Set psCaption to "click row image" Set piColumnSpan to 3 Set piColumnIndex to 8 End_Object Object oOrders is a csfWebList Set piColumnIndex to 0 Set piColumnSpan to 12 Set piHeight to 200 Set Server to oOrderHeaderDataDictionary Set pbAllowFiltering to True Set pbAllowGrouping to True Set pbAllowPdfExport to True Set pbAllowReordering to True Set pbAllowResizing to True Set pbAllowSorting to True Set pbFillHeight to True Set pbShowColumnMenu to True Set pbAllowExcelExport to True Set pbShowToolBar To True // Enable virtualization works well, but has the side effect that a showInfoBox does not // sit on top of the table content any more. Set pbEnableVirtualization To True // Set pbServerOnCreated to True Send AddToolBarItem "Search" { WebProperty=ServerSession } Property tGridLayout pGridLayout Object oNumber is a csfWebColumnLink Entry_Item OrderHeader.Order_Number Set psCaption to "No." Set piWidth to 20 Procedure OnClick String sRowID String sCellValue Send ShowInfoBox sRowId End_Procedure End_Object Object oDate is a csfWebColumn Entry_Item OrderHeader.Order_Date Set psCaption to "Date" Set piWidth to 50 End_Object Object oCustomer is a csfWebColumn Entry_Item Customer.Name Set psCaption to "Customer" Set piWidth to 100 End_Object Object oSalesP is a csfWebColumn Entry_Item SalesPerson.Name Set psCaption To "Sales Person" Set psField To "salesPerson" Set piWidth to 100 End_Object Object oAmount is a csfWebColumn Entry_Item OrderHeader.Order_Total Set psCaption To "Amount" Set psField To "amount" Set piWidth To 50 Set psMask To "########" Set psHeaderTextAlign to "Right" Set psTextAlign To "Right" //Set psFormat To "C2" Set psType To "number" //Set pbEnableGroupByFormat To False End_Object Object oStaticImageCol is a csfWebColumnImage Set psImageUrl to "Images/Order.png" Set psCaption to "Icon" Set psField To "orderImg" Set piWidth To 30 Set pbServerOnClick to True Procedure OnClick String sImage String sRowId String sCustomer Forward Send OnClick sImage sRowId WebGet psValue Of oCustomer To sCustomer WebSet psCaption Of oHintLabel To sCustomer // show info box is displayed partly under the grid when the EnableVirtualization is on. // ** Works fine now with fixes in application.css Send ShowInfoBox "You've clicked the image!" End_Procedure End_Object //Object oOrderIDAggregate Is a csfWebColumnAggregate // Set psType To "Sum" // Set psField To "amount" // Set psFormat To "C2" // Set psFooterTemplate To "TOTAL:" //End_Object Object oGroupTotalAmount is a csfWebColumnAggregate Set psType to "Sum" Set psField to "amount" Set psFormat to "C2" End_Object Object oTotalAmount is a csfWebColumnAggregate Set psType to "Sum" Set psField to "amount" Set psFormat to "C2" //Set psFooterTemplate to "TOTAL: ${Sum}" End_Object //Send AddGroupSettingsColumn "salesPerson" Set pbServerOnRowClick to True Procedure OnRowClick String sRowID Send ShowInfoBox "on row click" End_Procedure Procedure OnLayoutChanged tGridLayout Layout WebSet pGridLayout to Layout End_Procedure Procedure OnRender tGridLayout Layout WebGet pGridLayout to Layout Send RestoreLayout Layout End_Procedure End_Object End_Object End_Object