//TH-Header //***************************************************************************************** // Copyright (c) 2020 PP7 // All rights reserved. // // $FileName : csfWebColumnButton.pkg // $ProjectName : PP7 SyncFusion // $Authors : Wil van Antwerpen // $Created : 06.04.2020 13:46 // // Contents: // This is a web framework wrapper class for the SyncFusion Grid control. // Documentation for the API is here: // https://ej2.syncfusion.com/documentation/api/grid // //***************************************************************************************** //TH-RevisionStart // ******************** // MODIFICATION SUMMARY // ******************** // ####### DD/MM/YYYY WHO COMMENT //TH-RevisionEnd Use csfWebColumnHtml.pkg { HelpTopic=cWebColumnButton } { DesignerJSClass=df.WebColumnButton } Class csfWebColumnButton Is a csfWebColumnHtml Procedure Construct_Object Forward Send Construct_Object { WebProperty=Client } Property Boolean pbDynamic False { WebProperty=Client } Property Boolean pbServerOnClick True { WebProperty=Client } Property String psBtnCssClass "" { WebProperty=Client } Property String psButtonCaption "" Set pbShowColumnMenu To False Set pbAllowSorting To False Set pbAllowFiltering To False { Visibility=Private } Property String[] paBtnOptions Set psHtmlBefore To '' // Set psJSClass To "sf.WebColumnButton" End_Procedure Procedure LoadCustomHtml Boolean bMulti String sCss String sBefore sAfter sCaption sHtml tsfWebColumnCustomDraw CustomDraw Get pbDynamic To bMulti If (bMulti=false) Begin Move True To CustomDraw.bHasHtml Get psHtmlBefore To sBefore Get psHtmlAfter To sAfter Get psBtnCssClass To sCss If (sCss<>"") Begin Move (Replace(">",sBefore,' class="'+sCss+'">')) To sBefore End Get psButtonCaption To sCaption If (sCaption<>"") Begin Move (sBefore+sCaption) To sBefore End Move sBefore To CustomDraw.sHtmlBefore Move sAfter To CustomDraw.sHtmlAfter End Else Begin Move False To CustomDraw.bHasHtml Move "" To CustomDraw.sHtmlBefore Move "" To CustomDraw.sHtmlAfter End Set pCustomDraw To CustomDraw End_Procedure Procedure LoadGridCell tWebCell ByRef tCell Boolean bMulti String[] aEmpty Set paBtnOptions to aEmpty Get pbDynamic to bMulti If (bMulti) Begin Send OnDefineButtons Get paBtnOptions to tCell.aOptions End // Give a chance to add custom tooltips & CSS Classnames Send OnDefineTooltip (&tCell.sTooltip) Send OnDefineCssClass (&tCell.sCssClassName) End_Procedure Procedure AddButton String sId String sCaption String sCssClass String[] aOptions Get paBtnOptions to aOptions Move sId to aOptions[SizeOfArray(aOptions)] Move sCssClass to aOptions[SizeOfArray(aOptions)] Move sCaption to aOptions[SizeOfArray(aOptions)] Set paBtnOptions to aOptions End_Procedure { MethodType=Event } Procedure OnDefineButtons End_Procedure // See DAW doc { MethodType=Event } Procedure OnClick String sButton String sRowID Integer iX Integer iY End_Procedure Procedure End_Construct_Object WebPublishProcedure OnClick Forward Send End_Construct_Object End_Procedure End_Class