Originally Posted by
Harm Wibier
I just briefly tested and I do not get this error when creating a cWebGrid inside a dynamic object container. Can you reproduce this in a simple example?
I used cWebList.
Have a class like this
Code:
Class cComingDel_box is a cTIWebList -->Just a cWebList
Procedure Construct_Object
Forward Send Construct_Object
Set pbDataAware to False
Set peLabelAlign to alignLeft
Set piMinHeight to 250
Set peDbGridType to gtManual
Set pbServerOnRowClick to True
Set pbShowLabel to True
Set psLabel to "10 deliveries today"
Set peLabelPosition to lpTop
Set pbShowSelected to False
Set psBackgroundColor to "LightGray"
Set piSortColumn to 2
-----This below makes it work in DF20.1
#IF (!@>200)
Set pbAllowColumnReordering to False
Set pbAllowColumnHiding to False
#ENDIF
End_Procedure //Construct_Object
Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID
Forward Send OnManualLoadData (&aTheRows) (&sCurrentRowID)
...Code to fill grid from esql
End_Procedure
Procedure OnProcessDataSet tWebRow[] aData Integer eOperation Integer iSelectedRowIndex
Forward Send OnProcessDataSet aData eOperation iSelectedRowIndex
If (eOperation = 1) Begin
...Code to Acces edit view
End //End If eOperation = 1
End_Procedure
Procedure OnRowClick String sRowID
Forward Send OnRowClick sRowID
Send ProcessDataSet 1
End_Procedure
End_Class
Inside the cWebDynamicObjectContainer I add my list like this:
Code:
Get CreateDynamicObject of oDashContainer (RefClass(cComingDel_box)) ("oObject" + String(WEBDYNAMICDASHBOARD.OBJECTID)) "" to hoObj
Get CreateDynamicObject of oDashContainer (RefClass(cTIWebColumn)) "oComingDelColumn1" ("oObject" + String(WEBDYNAMICDASHBOARD.OBJECTID)) to hoCol
Move "Order" to sTranslated
If (iTranslate > 1) Begin
Get fProWebTranslate "Order" to sTranslated
If (sTranslated = "") ;
Move "Order" to sTranslated
End
Send InitDynamicProp of hoCol "psCaption" sTranslated
Send InitDynamicProp of hoCol "piWidth" 50
Get CreateDynamicObject of oDashContainer (RefClass(cTIWebColumn)) "oComingDelColumn2" ("oObject" + String(WEBDYNAMICDASHBOARD.OBJECTID)) to hoCol
Move "Kund" to sTranslated
If (iTranslate > 1) Begin
Get fProWebTranslate "Kund" to sTranslated
If (sTranslated = "") ;
Move "Kund" to sTranslated
End
Send InitDynamicProp of hoCol "psCaption" sTranslated
Send InitDynamicProp of hoCol "piWidth" 50
Get CreateDynamicObject of oDashContainer (RefClass(cTIWebColumn)) "oComingDelColumn3" ("oObject" + String(WEBDYNAMICDASHBOARD.OBJECTID)) to hoCol
Move "Leverans" to sTranslated
If (iTranslate > 1) Begin
Get fProWebTranslate "Leverans" to sTranslated
If (sTranslated = "") ;
Move "Leverans" to sTranslated
End
Send InitDynamicProp of hoCol "psCaption" sTranslated
Send InitDynamicProp of hoCol "piWidth" 50