Skip to end of metadata
Go to start of metadata

LayoutSet in WebCombo.NET 4.0 provides a centralized access to control the behavior and styles of the whole WebCombo object. This class allows users to manage the behavior and styles for almost the whole control's part.

Definition

public sealed class LayoutSet : WebUIBaseClass

Summary

The following table summarizes the members exposed in this class.

Public Constructors

LayoutSet Constructor() Initializes a new instance of the LayoutSet class with no argument.
LayoutSet Constructor(SerializationInfo, StreamingContext) Initializes a new instance of the LayoutSet class with SeriliazationInfo and StreamingContext.

Public Properties

AdjustResultBoxLeft Specifies the left position adjustment for ResultBox object.
AdjustResultBoxTop Specifies the top position adjustment for ResultBox object.
AllowAddItem Specifies whether item addition is allowed when input text doesn't match any list items.
AllowDefaultStyleMerging
AllowFloatingText Specifies whether users can set some text to float in the right side of WebCombo control.
AllowNavigationOnMouseWheel Specifies whether navigation of records is allowed when moving the mouse wheel.
AllowTextWrapping Returns or sets whether overflow text will be wrapped to next line. If set to false, the overflow text will be truncated with ellipsis.
AlwaysShowAllRowsOnDropdown Determines whether or not to display all rows when dropdown arrow is clicked.
AlwaysShowColumnHeaders Specifies whether the column headers are displayed when LayoutSet is set to MultipleColumns.
AlwaysShowHelpButton Specifies whether the help button is displayed.
AlwaysShowResultBox Specifies whether result box is still displayed after item selection made by mouse click.
AlwaysShowSearchButton Specifies whether the dropdown arrow button is displayed.
AutoColumnOrdering
BoundMode Gets or sets the bound mode of WebCombo.
ClientSideEvents Represents ClientEvents object that hold list of client events
ColumnSeparatorColor Gets or sets the separator color between columns
ColumnStyle The styles applied to column.
ColumnWidthDefault Specifies the column width default. Only affected to MultipleColumns mode.
Combo A reference to the WebCombo object that contains the Layout.
ComboMode Specifies the mode of the WebCombo control.
DropDownStyle The interactive style applied to WebCombo's DropDown.
EnableAnimation Enable background image animation in dropdown element.
EnableSlidingAnimation Specifies whether the ResultBox should be animated when user clicked on the drop down element of the WebCombo.
EntryMode Gets or sets the entry behavior of WebCombo.
FrameStyle The interactive styles of the WebCombo's Frame.
HeaderStyle The styles applied to columns header.
HelpImage Specifies the image for Help.
HelpURL Specifies the client's help URL when user click on the Help icon. The default is Intersoft's own help page URL. This property is application-wide configurable.
ImagesDirectory Specifies the directory used to store WebCombo images files.
ItemHeight Specifies the default item row height.
LoadMoreKeyGesture
MoreButtonStyle The interactive style applied to WebCombo's more button.
NoResultFoundAction Gets or sets the action which WebCombo should perform when there are no results found and the WebCombo has lost its focus.
ResultBoxHeight Returns or sets the height of the result box.
ResultBoxShadow Specifies whether shadow should be applied to resultbox. This property is only applicable to IE browser and ResultBoxWindowType should be set to Normal.
ResultBoxStyle The sytle applied to result box (only the box that contain data)
ResultBoxWidth Returns or sets the width of the result box. Set this property to 0 for automatic width calculation.
ResultBoxWindowType Specifies the resultbox's window type. This property is only applicable to IE browser.
ResultFrameStyle The styles applied to result frame (the outer result box).
RoundCorner Specifies whether the combo render the control's user interface in round corner effect.
RowStyle The interactive style applied to row.
ScriptDirectory This property is available for backward compabitility with V2.x only. This property is linked to WebCombo.ScriptDirectory directly.
SearchButtonPosition Gets or sets the search button (dropdown button) position of the WebCombo.
SearchIconMode Specifies the mode of search icon.
SearchImage Specifies the image for search icon.
SelectedRowStyle The styles applied to selected row.
StatusBoxPosition Specifies the status box position.
StatusBoxStyle The style applied to the status box.
StatusBoxVisible Specifies whether the status box is visible or not.
TextBoxMode Returns or sets the textbox mode of the control.
TextBoxStyle The interactive style applied to WebCombo's TextBox.
TextSettings Represents a TextSet object which contains text used in WebCombo control.
XhtmlSearchImage Specifies the image file name used to render the search button's arrow. This property is designed to be used in XHTML document and applies to Mozilla browsers.

Public Methods


Public Constructors

public LayoutSet()

Initializes a new instance of the LayoutSet class with no argument.

public LayoutSet(SerializationInfo info, StreamingContext context)

Initializes a new instance of the LayoutSet class with SeriliazationInfo and StreamingContext.

Parameters

info
context

Public Properties

public int AdjustResultBoxLeft { get; set; }

Specifies the left position adjustment for ResultBox object.

public int AdjustResultBoxTop { get; set; }

Specifies the top position adjustment for ResultBox object.

public bool AllowAddItem { get; set; }

Specifies whether item addition is allowed when input text doesn't match any list items.

Remarks

When set to True, input text that doesn't match the text in the list will automatically be added in the list. You can write client scripts to validate and response this event by assigning your function name in OnAddItem. To cancel the default item addition process, return the function's value as false (return false). In DataBound mode, the AddItem server side event will be invoked after the clientside OnAddItem's event is evaluated and the return value is true. The server side AddItem event provides a way for developer to handle and process the added item to the DataSource.

public bool AllowDefaultStyleMerging { get; set; }

public bool AllowFloatingText { get; set; }

Specifies whether users can set some text to float in the right side of WebCombo control.

Remarks

Unlike in WebCombo.NET v3.0, the inline text in the left and right side of WebCombo.NET v4.0 is pushed to either top or bottom of the WebCombo element. By default, inline text can no longer be at the same row with WebCombo due to this changes. To give you better illustration on how to set the text on the right side of WebCombo, you can read How-to: Enable text floating to the right side of the WebCombo.NET control. To enable text floating on the left side of WebCombo (the behavior of WebCombo.NET 3.0), you can follow the steps in How-to: Simulate inline text floating behavior as in previous version. Although the above techniques works properly in common scenarios, it is not the recommended way to create pixel-perfect layout. We recommend you to create side-by-side elements in a single row is by using TABLE layout. TABLE layout enables you to create layout that will look and behave consistently in either old or modern browsers. If your web page has been using TABLE layout since previous version of WebCombo.NET, you don’t need to perform any extra efforts to adapt to the changes in User Interface. As an example, all of our samples provided in the previous version of WebCombo were using TABLE layout. When they are migrated to version 4.0, they can be displayed properly without changes.

public bool AllowNavigationOnMouseWheel { get; set; }

Specifies whether navigation of records is allowed when moving the mouse wheel.

public bool AllowTextWrapping { get; set; }

Returns or sets whether overflow text will be wrapped to next line. If set to false, the overflow text will be truncated with ellipsis.

public bool AlwaysShowAllRowsOnDropdown { get; set; }

Determines whether or not to display all rows when dropdown arrow is clicked.

Remarks

This behavior allows filtering to be turned off easily when there is selected value and dropdown arrow is clicked. Note that AdditionalFilter will still take affect and DropDownRows property will be accounted.

public bool AlwaysShowColumnHeaders { get; set; }

Specifies whether the column headers are displayed when LayoutSet is set to MultipleColumns.

public bool AlwaysShowHelpButton { get; set; }

Specifies whether the help button is displayed.

public bool AlwaysShowResultBox { get; set; }

Specifies whether result box is still displayed after item selection made by mouse click.

public bool AlwaysShowSearchButton { get; set; }

Specifies whether the dropdown arrow button is displayed.

public bool AutoColumnOrdering { get; set; }

public BoundMode BoundMode { get; set; }

Gets or sets the bound mode of WebCombo.

Remarks

By default, the bound mode of WebCombo is set to AutoDetect, that means it will automatically determine whether the WebCombo is working in DataBound or Unbound mode. The detection is basically based on the WebCombo property of the WebCombo. If the DataSource is filled then WebCombo will work in DataBound mode, it will query the InitializeDataSource event. Generally, it is best to leave this setting to the default but in some complex scenarios where DataBound mode can't be determined automatically such as in Requery implementation, you can force the WebCombo to work in DataBound mode by setting the value of this property to ForceBound.

public ClientEvents ClientSideEvents { get; set; }

Represents ClientEvents object that hold list of client events

Remarks

Client-Side event editor is used to attach a client-side event handler to the event. This will enable WebCombo to accommodate a broad range of scenarios through its extendable capability using client-side events. Some of the ClientEvents property that often used are ClientEvents and ClientEvents.

public Color ColumnSeparatorColor { get; set; }

Gets or sets the separator color between columns

public WebStyle ColumnStyle { get; set; }

The styles applied to column.

Remarks

You can customize the WebCombo's column table using this property, such as changing the back color, border color, font, and so on.

public Unit ColumnWidthDefault { get; set; }

Specifies the column width default. Only affected to MultipleColumns mode.

Remarks

The default value of this property is 100px.

public WebCombo Combo { get; set; }

A reference to the WebCombo object that contains the Layout.

Remarks

WebCombo.NET 4.0 is designed to deliver cleaner and lighter output for faster page rendering. This latest version is able to render work properly in XHTML 1.1 Transitional Doc Type. It uses Vista style for its background animation support that allow users to deliver greater data input experience to your web application. As a result, the user interface of WebCombo.NET 4.0 is sleeker and smother than ever before. The latest version of WebCombo.NET solves several problems and limitations that existed in the previous version such as the capability to input free text value and integration with WebMenu or other containers as the dropdown. These new features, along with some others make WebCombo.NET 4.0 the most powerful ComboBox component. WebCombo.NET version 4.0 also introduce you to a new codeless data binding experience. It will be one of the most important productivity gains that you can experience. Codeless databinding means that you can configure the datasource, its connection and its related property without writing codes. You can do everything by simply using drag, drop and click. For more information, you can read: Walkthrough: Binding WebCombo to AccessDataSource control, Walkthrough: Binding WebCombo to ObjectDataSource control, and Walkthrough: Binding WebCombo to ISDataSource control.

public Mode ComboMode { get; set; }

Specifies the mode of the WebCombo control.

Remarks

The control will work as a normal dropdownlist control when it is set to SingleColumn (Default). In this mode, WebCombo and WebCombo will be used to display data. Other columns in DataSource are ignored. On the other hand, the control will show all columns by default when it is set to MultipleColumns. WebCombo field will always at the first position and its width is set to the width of control by default. For greater level of customization, WebCombo provides Column object which contains basic column properties such as HeaderText or Width. You can access the Column object after is called.

public DynamicStyle DropDownStyle { get; set; }

The interactive style applied to WebCombo's DropDown.

public bool EnableAnimation { get; set; }

Enable background image animation in dropdown element.

Remarks

WebCombo.NET 4.0 supports background image animation to help you replicate rich UI controls in Windows Vista®. In this version, the background image animation is supported in dropdown element only. However, note that the image animation requires certain design in order to create smooth effect. Not all design will look good when the animation is enabled. For instance, the default style that comes in version 4.0 is specially designed to display smoothly while animation is enabled. When a new instance of WebCombo is created in designer (design time), EnableAnimation is enabled by default. However, to preserve compatibility with existing application, this new feature will not be enabled for existing instances of WebCombo. To enable dropdown background animation on WebCombo, you can read How-To: Enable animation.

public bool EnableSlidingAnimation { get; set; }

Specifies whether the ResultBox should be animated when user clicked on the drop down element of the WebCombo.

Remarks

One of the Intersoft’s focuses in the 2008 release is core animation feature. In this new release, you can add stunning quadratic sliding animation to WebCombo control. When this feature is applied, the sliding animation will be played when you clicked on the dropdown arrow. The animation will also be played every time the dropdown content needs to be displayed – such as when you type into the textbox.

public EntryMode EntryMode { get; set; }

Gets or sets the entry behavior of WebCombo.

Remarks

WebCombo.NET includes 2 new entry behaviors for Bound mode instead of existing entry mode which called Default. The InstantLookup entry mode designated for scenarios which input data is mostly available and exact such as "OrderID". This mode is also designed for end-users who requires fast data entry and only wanted to see the resultbox when exact match is not found. Scenario example for InstantLookup mode: Let's say user wants to search OrderID "299980" "299980" is typed in the WebCombo's textbox (any combination of one or more characters). WebCombo will not perform any search at this step. Pressing Enter or Tab key fires "InitializeDataSource" event. WebCombo.NET searches the text in database and upon a perfect match "ValueChanged" event is fired when AllowAutoPostBack is set to True - no resultbox is shown. When AllowAutoPostBack is set to False (default), the WebCombo will simply set the text as selected and assign the corresponding value automatically from search result. In case there is no perfect match (result is 0 or more than 1 or when input text is not equal to result's text), the resultbox window will be shown (as in Default mode). Notes that when AllowAutoPostback is not used when using this mode, you should make sure that all controls that cause postback should check the state of the WebCombo before the postback occurs. This is important because the WebCombo will perform searching silently in this mode. For example, you typed "299980" then you click on a button, upon the focus changes from WebCombo to Button, WebCombo will try to check whether specified input has perfect match in the database. If yes then the value will be assigned to the WebCombo and mark it as selected. Looking at the mechanism above, clicking on a button that cause postback after typing the value in WebCombo will cause the WebCombo's value to Empty. This condition happened because WebCombo's asynchronous searching hasn't return any result yet when the postback occured. Although the above scenario might be rare to happen, it is a good idea to avoid any further issues. You can easily handle the form's onsubmit event and perform a simple check such as: if (webCombo.IsInProgress) { alert("wcOrderID's searching is in progress..."); return false; } Alternatively, if the WebCombo is a required field, you can put a .NET required validator to check the WebCombo's value. In this case, when you changed focus from WebCombo to button, the page will not postback because there is no selected value yet in WebCombo. The AutoComplete entry mode allow "traditional" text auto-completion such as in IE 4.x days. The entry mode has exact behavior as in Default mode, except it will autocomplete the text with first matched result.

public DynamicStyle FrameStyle { get; set; }

The interactive styles of the WebCombo's Frame.

public WebStyle HeaderStyle { get; set; }

The styles applied to columns header.

public string HelpImage { get; set; }

Specifies the image for Help.

public string HelpURL { get; set; }

Specifies the client's help URL when user click on the Help icon. The default is Intersoft's own help page URL. This property is application-wide configurable.

public string ImagesDirectory { get; set; }

Specifies the directory used to store WebCombo images files.

Remarks

Same thing like ScriptDirectory, In WebCombo.NET V5.0 the required images for the control at runtime are bundled in single assembly of WebGrid's SmartWebResources. When the SmartWebResources Framework is configured to "Auto" mode and the ImagesDirectory has been changed (not default value), the SmartWebResources will not attempt to enable itself when it detects customized ImagesDirectory (same behavior with the behavior of LayoutSet). This ensures that your existing web application runs perfectly after you migrate to the new framework. If ImagesDirectory is customized, but ScriptDirectory is using default value (not customized), the SmartWebResources will fallback to ScriptOnly mode. That means, the scripts will be handled by SmartWebResources. For more information, please read the SmartWebResources™ modes.

public Unit ItemHeight { get; set; }

Specifies the default item row height.

Remarks

The default value is 20px.

public LoadMoreKeyGesture LoadMoreKeyGesture { get; set; }

public DynamicStyle MoreButtonStyle { get; set; }

The interactive style applied to WebCombo's more button.

public NoResultFoundAction NoResultFoundAction { get; set; }

Gets or sets the action which WebCombo should perform when there are no results found and the WebCombo has lost its focus.

Remarks

This property only applicable when WebCombo is in following conditions: - WebCombo is configured to use Bound mode. - WebCombo is not using AllowAddItem feature. WebCombo.NET V3 improves the natural behavior of end users while entrying data. WebCombo.NET introduced Latency property which determines the number of milliseconds to wait before requesting the data to server. Everything is good except for fast-typing end users as the users typed the data quicker than the Latency period, and press Tab key to go to the next field. In previous versions, the scenario above would fail as the typed data will be reverted back (or empty if previously has no selection). It would also sometimes redisplay the resultbox in incorrect position and causing some interruption since the WebCombo expects the user to wait for the response and then select an input before entering next field. In V3, this scenario has been completely taken care. WebCombo will do following: - Silently select the result if the result row is only 1, and that row has the same text as input text. No display or focus interuption occured. - If the returned rows are more than one or empty, WebCombo will get the NoResultFoundAction property and perform the action according to value of this property. If this property is set to RevertSelection, then WebCombo will revert back the previously selected value when the returned rows are more than one or empty. Otherwise, WebCombo will take the focus back to the related WebCombo instance and display the ResultBox so the end users know that his/her entry is incorrect.

public int ResultBoxHeight { get; set; }

Returns or sets the height of the result box.

public bool ResultBoxShadow { get; set; }

Specifies whether shadow should be applied to resultbox. This property is only applicable to IE browser and ResultBoxWindowType should be set to Normal.

public WebStyle ResultBoxStyle { get; set; }

The sytle applied to result box (only the box that contain data)

public int ResultBoxWidth { get; set; }

Returns or sets the width of the result box. Set this property to 0 for automatic width calculation.

public DisplayType ResultBoxWindowType { get; set; }

Specifies the resultbox's window type. This property is only applicable to IE browser.

public WebStyle ResultFrameStyle { get; set; }

The styles applied to result frame (the outer result box).

public bool RoundCorner { get; set; }

Specifies whether the combo render the control's user interface in round corner effect.

Remarks

RoundCorner shape rendering is one of the most enhancement of user interface in WebCombo.NET v4.0. The round corner is fluid and flexible, means that it can be drawn properly regardless of the size. The round corner rendering in WebCombo.NET 4.0 adopts Intersoft’s proprietary TrueShape™ rendering framework which is widely used in WebDesktop.NET components. The round corner interface enables you to display smooth and stylish user interface in your web application as well as delivering unique user experience. To enable round corner in WebCombo, simply set the RoundCorner in LayoutSettings to True from the WebCombo Designer. To give you better illustration you can read Fluid round corner through TrueShape™.

public DynamicStyle RowStyle { get; set; }

The interactive style applied to row.

public string ScriptDirectory { get; set; }

This property is available for backward compabitility with V2.x only. This property is linked to WebCombo.ScriptDirectory directly.

Remarks

In previous versions, resources of product such as scripts are stored in ScriptDirectory. For example, WebCombo's resources are stored in /CommonLibrary/WebCombo/V4_0_7200. Since WebCombo.NET v5.0 uses a new SmartWebResources Framework, the resources in script directory are now embedded into .NET assembly. Unlike ASP.NET’s built-in Web Resources which embeds client resources in main assembly, SmartWebResources stores each product’s client resources in separate assembly. This enables flexible update (maintenance) to the client resources without has to rebuild the main server-side assembly. With SmartWebResources enabled, you no longer need to aware what you should do to configure the client scripts virtual directory, or where to locate/store it. You simply ensure that the resources assemblies are in the Bin folder of your application. For more information, you can read How-to: Configure SmartWebResources in a web application. The "Auto" mode of SmartWebResources will attempt to use SmartWebResources whenever possible. When it detects invalid configuration or usage of product that does not support SmartWebResources, it will automatically fallback to traditional physical client resources approach. For instance, if ScriptDirectory or SharedScriptDirectory has been changed (not default), SmartWebResources detects whether an existing web application was configured to use specific script directory other than the default (for best compatibility). Let's say if the ScriptDirectory is set to “~/SomeOtherFolders” in the control tag or in web.config, then SmartWebResources will not attempt to enable itself. If ScriptDirectory is customized, but ImagesDirectory is using default value (not customized), the SmartWebResources will fallback to ResourceOnly mode. That means, images and other client resources will still be handled by SmartWebResources. For more information, please read the SmartWebResources™ modes.

public ButtonPosition SearchButtonPosition { get; set; }

Gets or sets the search button (dropdown button) position of the WebCombo.

Remarks

You can determine whether the search button is positioned on the right or left of WebCombo.

public SearchMode SearchIconMode { get; set; }

Specifies the mode of search icon.

public string SearchImage { get; set; }

Specifies the image for search icon.

public WebStyle SelectedRowStyle { get; set; }

The styles applied to selected row.

public BoxPosition StatusBoxPosition { get; set; }

Specifies the status box position.

Remarks

In WebCombo.NET v4.0, there are several properties which default value have been changed for better user interface that adapt to most common scenarios. Unlike in the previous version (which the default value is Top), the default value of this property in version 4.0 has been changed to Bottom. The changes in default values do not affect the functionality of WebCombo controls.

public WebStyle StatusBoxStyle { get; set; }

The style applied to the status box.

public bool StatusBoxVisible { get; set; }

Specifies whether the status box is visible or not.

public TextboxMode TextBoxMode { get; set; }

Returns or sets the textbox mode of the control.

Remarks

The default value in this property is Editable - it means user can type or add a value on the combo. However users can set this property to ReadOnly, in which the combo is not editable.

public DynamicStyle TextBoxStyle { get; set; }

The interactive style applied to WebCombo's TextBox.

public TextSet TextSettings { get; set; }

Represents a TextSet object which contains text used in WebCombo control.

Remarks

Using this property you can modify the default text settings. The combo-level TextSettings customization is the lowest level which will override the definition in default xml language file as well as custom defined language file. This provides flexibility to developers who wanted to customize specific TextItem that applicable to a combo instance only. Note that all properties in TextSettings should be removed in order for the new combo to work properly.

public string XhtmlSearchImage { get; set; }

Specifies the image file name used to render the search button's arrow. This property is designed to be used in XHTML document and applies to Mozilla browsers.

Public Methods

public void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info
context

public string ToString()

  • No labels