K2BWebPanelDesigner Abstract Layout Editor Layout Object


There are cases in which developers want to change the disposition of elements inside web panels generated by K2BWebPanelDesigner. For this purpose K2BWebPanelDesigner has a default layout that can be modified by the user. Using this object the developer can change how all web panels are generated. The developer can also create a copy of the object to change how some web panels are generated.

This page shows how to modify the Layout Object used in the generation of Web Forms when the Responsive generator is used.

How it works

In K2BWebPanelDesignerSettings there is a property named Responsive LayoutObject. Its default value is "WebPanelDesignerLayoutFlat". You can edit the "WebPanelDesignerLayoutFlat" object or create a new web panel and set it as the Responsive Layout Object.

The images below show how web panels designed using K2BWebPanelDesigner object are generated.

WebPanelDesignerResponsiveLayoutObject WebPanelDesignerResponsiveLayoutObjectRT
WebPanelDesignerLayoutObject WebPanelDesigner Object in RunTime

Customizing Layout Object

In order to customize the layout object, you must know that webpaneldesigner the contents of the web panel according to the control names and control type.

These are the controls that must be included in the layout object.

Component Type Control Name Usage
Textblock Title It will be replaced by web form Title.
Errorviewer K2BErrorViewer If in WebForm node the property "need error viewer" is set to false, it will be removed from the web form.
Table ContentTable All the content generated will be placed here.
Textblock HiddenItems The hidden items generated will be placed here.
Textblock ConditionalConfirm The conditional confirm web form will be placed here (if the control is necessary).
Textblock GlobalGridTable The table that contains all the controls generated for grids.
Table FiltersContainer The grids filters will be placed here.
Textblock RuntimeColumnManagement The Runtime Column Selection control will be placed here (only when grid settings are not being used)
Textblock GridSettingsContainer The grid settings control will be placed here.
Grid GridContent The grid's content (its columns, or its free style section) will be placed here.
Table PagingContainer The grid's paging controls will be placed here.
Table OrderByContainer Order by will be placed there.
Table SummaryContainer Grid summary information will be placed there.
Table ActionsContainer Grid actions will be placed here.

It is important to note that all controls corresponding to a grid must be placed inside the "GlobalGridTable". The controls that must be placed this way are: FiltersContainer, RuntimeColumnManagement, GridSettingsContainer, GridContent, PagingContainer, OrderByContainer, SummaryContainer, and ActionsContainer.

Responsive Sizes

Then modifying this object, responsive sizes properties may be modified in tables other than the ones specified above (new tables may be added). The values for these properties will be used in all generated Web Panels.

Note: Some web panels may contain many grids. In this scenario, the control "GlobalGridTable" will be replicated as many times as necessary to include all the grids defined. Bear this in mind when performing the modifications.