Skip to end of metadata
Go to start of metadata

WebCombo is the main control object. WebCombo provides advanced data-bound functionality without additional server pages or components. The LayoutSettings property contains many of the appearance and layout settings for WebCombo.

Definition

public class WebCombo : ISNetControl,

IPostBackEventHandler, INamingContainer, IAutoDataCache, IFlyPostBack,

ISDataSource, ICustomXmlSerializer, IClientAction, IDataSourceControlSupport,

IClientBinding

Summary

The following table summarizes the members exposed in this class.

Public Constructors

WebCombo Constructor() Initializes a new instance of the WebCombo class with no argument.
WebCombo Constructor(string) Initializes a new instance of the WebCombo class with Id parameter.

Protected Constructors

Public Properties

ActionName Gets the name of the current FlyPostBack action.
AdditionalFiltersText Returns or sets the additional filter text for WebCombo control.
AdditionalSearchFields Returns or sets the additional data field used to match rows against user's input.
AllowAutoDataCaching Specifies whether data caching is automatically handled by the control.
AllowAutoPostback Specifies whether postback will be automatically invoked when selected index is changed.
AllowAutoQueryHandler Specifies whether or not to allow WebCombo to automatically handle query request.
AllowWildCardSearch Specifies whether or not to allow wild card searching / fuzzy logic searching.
AutoLoad Specifies whether the control should automatically make initial request on page load.
BackColor Returns or sets the background color of the control.
BindingOperationMode Gets or sets the control operation mode for data binding.
BorderColor Returns or sets the border color of the control.
BorderStyle Returns or sets the border style of the control.
BorderWidth Returns or sets the border width of the control.
CacheServerConnection Specifies the file server connection string to store data cache.
ClientBindingSettings Provides settings for client data binding.
Columns Returns the Column collection used to display each column when WebCombo's mode is set to MultipleColumns.
CssClass
DataCacheStorage Specifies where to store the data cache.
DataMember Specifies the data member in multimember data source to bind to the WebCombo control.
DataSource Specifies the datasource object which the control bind to.
DataSourceID Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.
DataTextField Returns or sets the data field used to display the text in WebCombo control.
DataValueField Returns or sets the field used as the value in WebCombo control.
DropDownRows Specifies the number of initial records retrieved by the WebCombo control.
EncodeOutput Determines whether the output should be encoded during the rendering.
FlyPostBackSettings Configures the settings used by the control when performing OnTheFly postback.
Font Returns or sets the font used in the control.
ForeColor Returns or sets a Color object that specifies the foreground color of the control.
FormKey
HasDataSource
IntegrationSettings Provides settings for integrating other server side controls as the WebCombo's ResultBox.
IsFlyPostBack Returns whether this WebCombo instance invokes OnTheFly postback.
Latency Specifies the wait time after last keypress in milliseconds before the control make data request.
LayoutSettings The central object that contain all the behaviors and styles for the whole WebCombo control.
LinkSettings Provides settings for linking to another WebCombo.
MinCharsToRequest Returns or sets the minimum length of input character for requesting data retrieval.
MultipleSelectionSettings Provides settings for multiple selections feature.
MultipleTexts
MultipleValues
Rows Returns the WebComboRow collection used to display each item in WebCombo's dropdown list.
ScriptDirectory Overriden.
SelectedRow Returns the selected WebComboRow object.
SerializeTagToClient Specifies whether the row's tag should be serialized to client side, when client binding is enabled.
SharedScriptDirectory Gets or sets the directory where all shared scripts for Intersoft controls are stored.
ShowErrorMessages Specifies whether to display error messages when DataSources, WebCombo or WebCombo is not specified.
showFieldNames
Text Gets the text of selected value in WebCombo's dropdown list. This property is readonly.
TextBoxLength Specifies the size of the textbox control.
UseCachedDataOnFirstLoad Specifies whether the cached data source will always be used on first page load.
UseDefaultStyle Indicates whether this control should use default WebCombo.NET 4.0 styles and appearance settings.
V4Initialized This property should not be used directly by developer. It is used by the control internally to determine versioning for default styles.
Value Returns or sets the value for WebCombo control.
Width Overriden. Returns or sets the width of the control.

Protected Properties

Public Methods

AddDataSourceToCache(object) Adds the specified datasource to cache storage.
CheckConstrains()
ClearCachedDataSource() Clears the cached data source.
CustomDeserialize(MemberInfo, object, XmlNode, XmlNode)
CustomSerialize(XmlDocument, XmlNode)
DataBind() Starts databinding process for the WebCombo control.
Focus()
GetCachedDataSource() Get the currently cached data source of the specified control.
GetClientAction()
GetColumn(string) Returns !:Column object which provide access to basic column properties. You should only use this method when !:ComboMode is set to MultipleColumns.
GetMultipleValues() Gets the multiple values collection in ArrayList object.
GetMultipleValuesText() Gets the string representation of multiple values' Text. Each values will be separated by the character specified in SeparatorChar property, followed by a space.
GetMultipleValuesValue() Gets the string representation of multiple values' Value. Each values will be separated by the character specified in SeparatorChar property, followed by a space.
GetObjectData(SerializationInfo, StreamingContext)
GetValueByText(string) Returns a value by specified text from datasource.
GetXMLData()
IsDataCached() Returns whether the Datasource is already cached.
LoadLayout(string) Developers can save commonly used Layout and apply it to WebCombo at runtime. This also enables developers to create highly customizable look and feel web applications by saving a few layout themes and let users choose their preferences at runtime.
LoadLayout(LayoutInfo) Load layout configuration from LayoutInfo object.
LoadLayoutFromFile(string)
LoadPostData(string, NameValueCollection)
OnAddItem(WebComboRow)
OnInitializeDataSource(object, bool, string, int, int, int, string, bool) Invoked when data source need to be initialized. It is highly recommended that you use this event to initialize your databinding code for more centralized and easy to maintain codes.
OnInitializeJsonRow(WebComboRow) Invoked when a !:WebGridRow need to initialized during data binding, when BindingOperationMode is set to ClientBinding.
OnInitializeLayout(LayoutSet) Invoked when the WebCombo's layout needs to be initialized during data binding. You can write the codes to set WebCombo's appearance-related settings in this event.
OnInitializePostBack(WebCombo, object, XmlDocument, string) Invoked when the WebCombo is performing OnTheFly postback. You can handle this event to perform additional functions or create your own custom actions.
OnInitializeRow(WebComboRow) Invoked when a WebComboRow is being initialized for rendering.
OnPrepareDataBinding(object, bool, string, int, int, int, string, bool)
OnPreRender()
OnRequest(object)
OnValueChanged(string, string) Invoked when the value is changed.
PopulateUnboundData(DataSet, string, bool) Populate the appropriate texts of the specified multiple values into a collection of WebComboValueItem objects.
PopulateUnboundData(DataTable, bool)
PopulateUnboundData(DataView, bool)
PopulateValueItems(string) Populate the appropriate texts of the specified multiple values into a collection of WebComboValueItem objects.
RaisePostBackEvent(string)
RaisePostDataChangedEvent()
RegisterScript()
ReInitialize() Forces WebCombo to be initialized. This method is useful when retrieving WebCombo object from persistence storage.
RenderEndTag(HtmlTextWriter)
ResetStyleToDefault() Clear any styles associated with this control and set the control to use default WebCombo.NET style.
SaveLayout(string) Saves LayoutSet properties to a file.
SaveLayout(Stream) Saves LayoutSet properties to Stream.
SetCacheControl(TimeSpan, CacheItemPriority) Overrides the default data cache configuration.
setClientBindingSettings(ClientBindingSettings)
SetDataSourceInternal(object)
SetEditorInfo(ISite, WebComboDesigner, object)
SetMultipleValues(string, string) Sets multiple values into the WebCombo.
SetMultipleValues(ArrayList) Sets multiple values into the WebCombo.
ShowOnlyColumns(String[]) Show only the columns specified in fieldNames. You should only use this method when LayoutSet is set to MultipleColumns.

Protected Methods

Events

AddItem Occurs when adding an item is performed.
InitializeDataSource Occurs when a datasource needs to be initialized during data binding.
InitializeJsonRow Manages delegate of the type !:ISNet.WebUI.WebGrid.RowEventHandler.
InitializeLayout Occurs when the grid's layout needs to be initialized during data binding.
InitializePostBack Occurs when when OnTheFlyPostBack action needs to be initialized.
InitializeRow Occurs when a row is being initialized and about to be rendered.
PrepareDataBinding Occurs when any data-related functionality is performed before the combo renders data.
ValueChanged Occurs when the value is changed.

Public Constructors

public WebCombo()

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

public WebCombo(string id)

Initializes a new instance of the WebCombo class with Id parameter.

Parameters

id

Protected Constructors

protected WebCombo(SerializationInfo info, StreamingContext context)

Parameters

info
context

Public Properties

public string ActionName { get; set; }

Gets the name of the current FlyPostBack action.

public string AdditionalFiltersText { get; set; }

Returns or sets the additional filter text for WebCombo control.

Remarks

You can add filters that you want to apply to the WebCombo object in either client or server side. To add filters from server side, simply set this property from anywhere in your webform's code. To add filters from client side, you can use provided wc_setAdditionalFilters function. The wc_setAdditionalFilters function takes 2 parameters that is ControlName and FilterText. See the example below on how to use the function in client side.

public string AdditionalSearchFields { get; set; }

Returns or sets the additional data field used to match rows against user's input.

Remarks

You can set multiple data fields by using comma as separator. For example, OfficePhone, HomePhone This property provides a convenient way for developers when the application require more than one data field to be searched instead of the specified WebCombo. When you set a value to this property and WebCombo is set to True, WebCombo will automatically search the user's input initially by DataTextField then followed by comma separated data fields assigned in this property. This feature is normally used in conjunction with MultipleColumns combo mode which allow users to see matched information in columns based on their input. Note that this property will only be used to search against user's input, the displayed selected text will still be using the value specified in DataTextField. To learn more on this feature please read Additional Search Field.

public bool AllowAutoDataCaching { get; set; }

Specifies whether data caching is automatically handled by the control.

Remarks

This property enables the automatic caching of assigned DataSource object. The default value is True which is a powerful and effective approach to reduce server's workload and dramatically increase server response time. By utilizing the power of .NET caching feature, WebCombo.NET implements advanced datacaching mechanism to reduce server workloads. The scope of the cache is session. This enables a greater and more flexible control to the WebCombo object. The WebCombo control keeps track of each session's cache and will automatically remove the WebCombo object from cache when it's no longer accessed. If the DataSource object is a dynamic object -- means that it is changed or added in less than 5 minutes -- you may consider to set this property to False. In order to take advantage of this property, you should always use to check whether the DataSource has already been cached before you assign a DataSource. See the example for details. In some scenarios, you can assign a different DataSource directly from code with just assigning the DataSource property to new datasource. In this case, old cache will be automatically removed and new instance of cache will be created.

public bool AllowAutoPostback { get; set; }

Specifies whether postback will be automatically invoked when selected index is changed.

Remarks

When this property is set to True, the browser will automatically invoke postback when selected index is changed. Default value is False.

public bool AllowAutoQueryHandler { get; set; }

Specifies whether or not to allow WebCombo to automatically handle query request.

public bool AllowWildCardSearch { get; set; }

Specifies whether or not to allow wild card searching / fuzzy logic searching.

Remarks

By setting this property to True, users will be able to perform fuzzy logic searching without has to add * in the front of input text. By default, this feature will allow WebCombo to search its data list from the first character based on the user's input. For example : if user inputs "a" in the search field, WebCombo will search for data that begins with the character "a". For more information, please read Allow Wildcard Search.

public bool AutoLoad { get; set; }

Specifies whether the control should automatically make initial request on page load.

public Color BackColor { get; set; }

Returns or sets the background color of the control.

public BindingMode BindingOperationMode { get; set; }

Gets or sets the control operation mode for data binding.

public Color BorderColor { get; set; }

Returns or sets the border color of the control.

public BorderStyle BorderStyle { get; set; }

Returns or sets the border style of the control.

public Unit BorderWidth { get; set; }

Returns or sets the border width of the control.

public string CacheServerConnection { get; set; }

Specifies the file server connection string to store data cache.

Remarks

WebCombo.NET v4.0 allows you to store data cache to a physical disc in the local computer or a shared drive in network. If you choose "FileServer" on WebCombo, the data cache will be stored to the path defined in CacheServerConnection property. This new option allows better scalability and reliability to your web application, as the data caches are no longer stored in ASP.NET's worker process or Session.

public ClientBindingSettings ClientBindingSettings { get; }

Provides settings for client data binding.

public Columns Columns { get; }

Returns the Column collection used to display each column when WebCombo's mode is set to MultipleColumns.

public string CssClass { get; set; }

public CacheStorage DataCacheStorage { get; set; }

Specifies where to store the data cache.

Remarks

The default value is PageCache. The PageCache data storage implementation is the one implemented in previous version of WebCombo component. This property is only taken affect when AllowAutoDataCaching property is set to True (by default). The new Session data storage mode enables better datasource persistent mechanism when information is more scoped per user's session. With this mode, datasource's cache will be valid as long as the session hasn't expired. The default PageCache storage mode is sufficient and effective for most development scenarios. Following describes the behavior of both modes: PageCache Stored in ASP.NET's built-in Cache object. Expiring in a time period, default is 15 minutes. Use SetCacheControl() method to control cache's time and priority. Requires implementation of InitializeDataSource event to taken affect effectively. Best used for scenarios when all level of data can be retrieved once together. Session Stored in Session object. Expiring when session is timed out or Session.Abandon() method is called. To longer the cache time, simply increase the Session's timeout value. Doesn't require implementation of InitializeDataSource event. Work perfectly with common databinding method using DataBind() in Page_Load event. However, databinding implementation using InitializeDataSource event is more recommended for centralized and standarization in control's binding mechanism. Best used for scenarios when data is scoped based per user/session and when on demand data retrieval implementation is required for WebCombo. Better performance, the control will only hit the database for first page load and use the cached data for entire session - unlike PageCache which will need to renew the data in a time period. Better scalability, you can implement SqlServer mode for storing the Session's data for larger applications that work in WebFarm or clustering.

public string DataMember { get; set; }

Specifies the data member in multimember data source to bind to the WebCombo control.

public object DataSource { get; set; }

Specifies the datasource object which the control bind to.

Remarks

One of WebCombo.NET key features is its ability to use the common DataSource and WebCombo method for data binding purpose. WebCombo.NET has been specially designed to bring a new web experience when selecting from a large dropdown rows and also meet the .NET infrastructure requirement needed by developers. DataSource property can be assigned from anywhere in the code. It supports all ADO.Net objects, means that you have all the flexibility to use custom classes that returns a DataSet object, stored procedures, Oracle source and so on. By assigning a DataSource, you are all set and the WebCombo control is ready to use. WebCombo control is built with automatic query handler. That means you don't have to create another stored procedure to match with the control's infrastructure. Instead, WebCombo's automatic query handler will do all required lookups and filtering process. This version of WebCombo supports even more data source types including SqlDataReader, OleDbDataReader, Xml data source and any objects that implement IEnumerable such as Collections or ArrayList. The feature works perfectly in conjuction with AutoQueryHandler, this allow developers to use non-DataSet objects as datasource while having query automatically handled by WebCombo.

public string DataSourceID { get; set; }

Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.

public string DataTextField { get; set; }

Returns or sets the data field used to display the text in WebCombo control.

Remarks

DataTextField is a required property in WebCombo control. The control will use the field specified in this property to display the text in WebCombo. DataTextField can be configured in WebCombo Designer. Alternatively, you can configure it programmatically under InitializeDataSource or InitializeLayout (please look at example above).

public string DataValueField { get; set; }

Returns or sets the field used as the value in WebCombo control.

Remarks

DataValueField is a required property in WebCombo control. The control will use the field specified in this property as the value in WebCombo. DataValueField can be configured in WebCombo Designer. Alternatively, you can configure it programmatically under InitializeDataSource or InitializeLayout (please look at example above).

public int DropDownRows { get; set; }

Specifies the number of initial records retrieved by the WebCombo control.

Remarks

This property is used to determine the number of retrieved records when requested by WebCombo control for the first time. The second and further request made by WebCombo is the double of this property. You may specify a larger number for this property if you run the control in Intranet or large bandwidth. The default value is 15.

public bool EncodeOutput { get; set; }

Determines whether the output should be encoded during the rendering.

public FlyPostBackSettings FlyPostBackSettings { get; }

Configures the settings used by the control when performing OnTheFly postback.

public FontInfo Font { get; }

Returns or sets the font used in the control.

Remarks

WebCombo.NET 4.0 uses "Segoe UI" as the standard font in all UI elements. As clear type font, it ensures better readability and smooth display. By default, WebCombo.NET 4.0 will use Tahoma font when “Segoe UI” can’t be found in user’s computer.

public Color ForeColor { get; set; }

Returns or sets a Color object that specifies the foreground color of the control.

public string FormKey { get; }

public bool HasDataSource { get; }

public WebComboIntegrationSettings IntegrationSettings { get; set; }

Provides settings for integrating other server side controls as the WebCombo's ResultBox.

public bool IsFlyPostBack { get; set; }

Returns whether this WebCombo instance invokes OnTheFly postback.

Remarks

The OnTheFly postback feature allows the implemented controls to interact with server and sends back only necessary UI elements, without the need to send the whole page's elements. This dramatically saves the server's resources, time and bandwidth needed to perform server interaction. To learn more please read OnTheFly PostBack.

public int Latency { get; set; }

Specifies the wait time after last keypress in milliseconds before the control make data request.

Remarks

Setting this property to a lower number produces a faster response based on entered query. You should carefully consider the value for this property as it will affect on server's performance and workloads. You may consider a lower number if you're using the control in Intranet or when server workload is minimal. Default value is 500. For more information, you can read How-to: Set the latency.

public LayoutSet LayoutSettings { get; set; }

The central object that contain all the behaviors and styles for the whole WebCombo control.

Remarks

All Intersoft's component provides a common, centralized object called LayoutSettings. It contains many features that allow you to fully customize each part of the control's look and feel directly at design-time, such as LayoutSet, LayoutSet, LayoutSet, and so on. WebCombo.NET 4.0 offers some new features in LayoutSettings. They are LayoutSet, LayoutSet and . The new features on WebCombo.NET v4.0 result in new and sleeker user interface. For more information and illustration on user interface, you can read New and Sleeker User Interface.

public LinkSettings LinkSettings { get; }

Provides settings for linking to another WebCombo.

public int MinCharsToRequest { get; set; }

Returns or sets the minimum length of input character for requesting data retrieval.

Remarks

Use this property when data retrieval is only need to be performed with a minimal length assigned in this property. For example, setting this property to 5 will tell WebCombo to retrieve data only when user typing in at least 5 character. Otherwise, WebCombo will not display the drop down list automatically. When the drop down arrow is clicked, it will display the drop down list but with no data retrieving. In this context, the status of the WebCombo will remain "Ready".

public MultipleSelectionSettings MultipleSelectionSettings { get; }

Provides settings for multiple selections feature.

public string MultipleTexts { get; }

public string MultipleValues { get; }

public Rows Rows { get; }

Returns the WebComboRow collection used to display each item in WebCombo's dropdown list.

public string ScriptDirectory { get; set; }

Overriden.

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 v4.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, 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). 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, you can read the SmartWebResources™ modes.

public WebComboRow SelectedRow { get; }

Returns the selected WebComboRow object.

public bool SerializeTagToClient { get; set; }

Specifies whether the row's tag should be serialized to client side, when client binding is enabled.

public string SharedScriptDirectory { get; set; }

Gets or sets the directory where all shared scripts for Intersoft controls are stored.

Remarks

Since WebCombo.NET v4.0 uses a new SmartWebResources Framework, the resources in script directory and shared scrip 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, read How-to: Configure SmartWebResources in a web application.

public bool ShowErrorMessages { get; set; }

Specifies whether to display error messages when DataSources, WebCombo or WebCombo is not specified.

public String[] showFieldNames { get; set; }

public string Text { get; }

Gets the text of selected value in WebCombo's dropdown list. This property is readonly.

public int TextBoxLength { get; set; }

Specifies the size of the textbox control.

Remarks

Use this property to limit the size of allowed input in WebCombo control. Default value is 0 (unlimited).

public bool UseCachedDataOnFirstLoad { get; set; }

Specifies whether the cached data source will always be used on first page load.

Remarks

The default value of this property is False, which means WebGrid disable the use cached data on first load.

public bool UseDefaultStyle { get; set; }

Indicates whether this control should use default WebCombo.NET 4.0 styles and appearance settings.

public bool V4Initialized { get; set; }

This property should not be used directly by developer. It is used by the control internally to determine versioning for default styles.

public string Value { get; set; }

Returns or sets the value for WebCombo control.

Remarks

You can set the Value property in code at runtime to set initial value for the WebCombo control. This property is also available at design time. Value property has behaviors as below: On databinding process, it will automatically check the existence of Value property in the DataSource. If the specified Value is found, the Text property will be automatically populated based on <ac:link ac:anchor="P:ISNet.WebUI.WebCombo.WebCombo.DataTextField"> <ri:page ri:content-title="WebCombo Class"/> <ac:plain-text-link-body><![CDATA[WebCombo]]></ac:plain-text-link-body> </ac:link> property. Otherwise, the Value and Text will be set to empty. The value property will also be automatically populated on every postback based on last active selection. You may also programmatically set a different value on postback event.

public Unit Width { get; set; }

Overriden. Returns or sets the width of the control.

Protected Properties

protected LicType LicenseType { get; set; }

protected bool OptimizeCss { get; }

protected bool OptimizeCssName { get; }

protected ProductInfo Product { get; }

protected Icon ProductIcon { get; }

protected Image ProductImage { get; }

protected bool SupportDataSourceControl { get; }

Public Methods

public void AddDataSourceToCache(object dataSource)

Adds the specified datasource to cache storage.

Parameters

dataSource

public void CheckConstrains()

public void ClearCachedDataSource()

Clears the cached data source.

public void CustomDeserialize(MemberInfo mi, object currentObj, XmlNode parentNode, XmlNode currentNode)

Parameters

mi
currentObj
parentNode
currentNode

public void CustomSerialize(XmlDocument doc, XmlNode node)

Parameters

doc
node

public void DataBind()

Starts databinding process for the WebCombo control.

public void Focus()

public object GetCachedDataSource()

Get the currently cached data source of the specified control.

Return Types

Cached data source object if any, otherwise returns null.

public BaseClientSideAction GetClientAction()

public WebComboColumn GetColumn(string fieldName)

Returns !:Column object which provide access to basic column properties. You should only use this method when !:ComboMode is set to MultipleColumns.

Parameters

fieldName The data field name.

Return Types

Returns !:Column object

public IEnumerable GetMultipleValues()

Gets the multiple values collection in ArrayList object.

Return Types

ArrayList object containing collection of WebComboValueItem objects which represents the multiple values entried by users.

public string GetMultipleValuesText()

Gets the string representation of multiple values' Text. Each values will be separated by the character specified in SeparatorChar property, followed by a space.

Return Types

string.

public string GetMultipleValuesValue()

Gets the string representation of multiple values' Value. Each values will be separated by the character specified in SeparatorChar property, followed by a space.

Return Types

string.

public void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info
context

public object GetValueByText(string text)

Returns a value by specified text from datasource.

Remarks

Use this method to return the corresponding value by a search text based on DataValueField and DataTextField in DataSource.

Parameters

text The text to search

Return Types

Object.

public string GetXMLData()

public bool IsDataCached()

Returns whether the Datasource is already cached.

Remarks

This method is required to take advantage of built-in datacaching mechanism implemented in WebCombo control. With automatic datacaching feature on, the codes in your webform code behind should looks like the example below. private void Page_Load(object sender, System.EventArgs e) { if (!WebCombo1.IsDataCached()) { WebCombo1.DataSource = LookupClass.GetProducts(); WebCombo1.DataBind(); } ///

Return Types

Returns true if DataSource is already cached

public void LoadLayout(string fileName)

Developers can save commonly used Layout and apply it to WebCombo at runtime. This also enables developers to create highly customizable look and feel web applications by saving a few layout themes and let users choose their preferences at runtime.

Parameters

fileName

public void LoadLayout(LayoutInfo settings)

Load layout configuration from LayoutInfo object.

Parameters

settings A LayoutInfo object representing the layout configuration.

public void LoadLayoutFromFile(string filePath)

Parameters

filePath

public bool LoadPostData(string postDataKey, NameValueCollection values)

Parameters

postDataKey
values

public bool OnAddItem(WebComboRow row)

Parameters

row

public bool OnInitializeDataSource(object dataSource, bool isFlyRequest, string queryText, int startRow, int endRow, int rowCount, string additionalFilters, bool isDDClicked)

Invoked when data source need to be initialized. It is highly recommended that you use this event to initialize your databinding code for more centralized and easy to maintain codes.

Remarks

Instead of writing your databinding code in Page_Load event, it is more effective to use InitializeDataSource event as a central place for the WebCombo's databinding code. By using this event, you are automatically taking advantage of the WebCombo's automatic data caching feature. Note that you don&#39;t need to use <ac:link ac:anchor="M:ISNet.WebUI.WebCombo.WebCombo.IsDataCached"> <ri:page ri:content-title="WebCombo Class"/> <ac:plain-text-link-body><![CDATA[WebCombo]]></ac:plain-text-link-body> </ac:link> anymore to query the DataCache status since that the control will automatically check it and only call this event when it needs DataSource. You also don&#39;t need to put it under !IsPostBack or other conditions because the event is only fired on first page load, on refresh, or when the cache has been cleared/expired. Additionally, the databinding code has been very simplified so that you don&#39;t have to call <ac:link ac:anchor="M:ISNet.WebUI.WebCombo.WebCombo.DataBind"> <ri:page ri:content-title="WebCombo Class"/> <ac:plain-text-link-body><![CDATA[WebCombo]]></ac:plain-text-link-body> </ac:link> after you assign the DataSource as needed by other controls normally.

Parameters

dataSource A reference to the dataSource object.
isFlyRequest
queryText
startRow
endRow
rowCount
additionalFilters
isDDClicked

Return Types

Returns ReturnValue. Event will be cancelled when ReturnValue is False.

public bool OnInitializeJsonRow(WebComboRow row)

Invoked when a !:WebGridRow need to initialized during data binding, when BindingOperationMode is set to ClientBinding.

Parameters

row

public bool OnInitializeLayout(LayoutSet layout)

Invoked when the WebCombo's layout needs to be initialized during data binding. You can write the codes to set WebCombo's appearance-related settings in this event.

Parameters

layout A reference to the LayoutSet object.

Return Types

Returns ReturnValue. Event will be cancelled when ReturnValue is False.

public bool OnInitializePostBack(WebCombo combo, object dataSource, XmlDocument request, string action)

Invoked when the WebCombo is performing OnTheFly postback. You can handle this event to perform additional functions or create your own custom actions.

Parameters

combo The reference to the WebCombo object.
dataSource The datasource.
request The request context in XmlDocument type.
action The action name of the current request.

public bool OnInitializeRow(WebComboRow row)

Invoked when a WebComboRow is being initialized for rendering.

Parameters

row The row which is being initialized.

Return Types

Returns ReturnValue.

public DataSourceEventArgs OnPrepareDataBinding(object dataSource, bool isFlyRequest, string queryText, int startRow, int endRow, int rowCount, string additionalFilters, bool isDDClicked)

Parameters

dataSource
isFlyRequest
queryText
startRow
endRow
rowCount
additionalFilters
isDDClicked

public void OnPreRender()

public void OnRequest(object requestObject)

Parameters

requestObject

public void OnValueChanged(string Text, string Value)

Invoked when the value is changed.

Parameters

Text Returns the new datatext from changed value.
Value Returns the new value.

public void PopulateUnboundData(DataSet ds, string dataMember, bool isAutoCreateColumn)

Populate the appropriate texts of the specified multiple values into a collection of WebComboValueItem objects.

Parameters

ds
dataMember
isAutoCreateColumn

public void PopulateUnboundData(DataTable dt, bool isAutoCreateColumn)

Parameters

dt
isAutoCreateColumn

public void PopulateUnboundData(DataView dv, bool isAutoCreateColumn)

Parameters

dv
isAutoCreateColumn

public ArrayList PopulateValueItems(string values)

Populate the appropriate texts of the specified multiple values into a collection of WebComboValueItem objects.

Parameters

values Multiple values separated by the character specified in SeparatorChar property.

Return Types

ArrayList.

public void RaisePostBackEvent(string eventArgument)

Parameters

eventArgument

public void RaisePostDataChangedEvent()

public void RegisterScript()

public void ReInitialize()

Forces WebCombo to be initialized. This method is useful when retrieving WebCombo object from persistence storage.

public void RenderEndTag(HtmlTextWriter writer)

Parameters

writer

public void ResetStyleToDefault()

Clear any styles associated with this control and set the control to use default WebCombo.NET style.

public void SaveLayout(string fileName)

Saves LayoutSet properties to a file.

Parameters

fileName The layout filename.

public void SaveLayout(Stream stream)

Saves LayoutSet properties to Stream.

Parameters

stream

public void SetCacheControl(TimeSpan duration, CacheItemPriority priority)

Overrides the default data cache configuration.

Parameters

duration The duration of the cache.
priority

public void setClientBindingSettings(ClientBindingSettings clientBindingSettings)

Parameters

clientBindingSettings

public void SetDataSourceInternal(object dataSource)

Parameters

dataSource

public void SetEditorInfo(ISite site, WebComboDesigner designer, object dataSource)

Parameters

site
designer
dataSource

public void SetMultipleValues(string text, string values)

Sets multiple values into the WebCombo.

Parameters

text string contains multiple value's text separated by the character specified in SeparatorChar property
values string contains multiple value's value separated by the character specified in SeparatorChar property

public void SetMultipleValues(ArrayList valueItems)

Sets multiple values into the WebCombo.

Parameters

valueItems ArrayList object contains a collection of WebComboValueItem objects.

public void ShowOnlyColumns(String[] fieldNames)

Show only the columns specified in fieldNames. You should only use this method when LayoutSet is set to MultipleColumns.

Parameters

fieldNames An array of string representing the field name you want it to be shown.

Protected Methods

protected ControlRenderer GetControlRenderer()

protected RenderDHTML GetDHTMLRenderer()

protected RenderNS GetNSRenderer()

protected void InitializeDefaultStyles()

protected void InitializeStyles()

protected void OnLoad(EventArgs e)

Parameters

e

protected void OnPreRender(EventArgs e)

Prepare the renderer and emit JavaScript

Parameters

e

protected void setColumns(Columns cols)

Parameters

cols

protected void setRows(Rows rows)

Parameters

rows

Events

public event RowEventHandler AddItem

Occurs when adding an item is performed.

public event DataSourceEventHandler InitializeDataSource

Occurs when a datasource needs to be initialized during data binding.

Remarks

In WebCombo.NET 3.0, using InitializeDataSource event users can make the data source bounded using e.DataSource (old databinding mode). You can also configure WebCombo and WebCombo properties of the WebCombo programmatically at this event. WebCombo.NET 4.0 introduces you to a new code-less data binding. Binding is supported through DataSource support. With this new datasource control concept, InitializeDataSource event is no longer fired when the WebCombo is bound to DataSourceID. This event will still be fired normally when the property is empty (old databinding mode). Programming databind web application is very easy, simple and straightforward. There are no codes that required in the page’s code behind if you use datasource control. To give you better understanding on code-less data binding, you can read: Walkthrough: Binding WebCombo to AccessDataSource control, Walkthrough: Binding WebCombo to ObjectDataSource control, and Walkthrough: Binding WebCombo to ISDataSource control.

public event RowEventHandler InitializeJsonRow

Manages delegate of the type !:ISNet.WebUI.WebGrid.RowEventHandler.

public event LayoutEventHandler InitializeLayout

Occurs when the grid's layout needs to be initialized during data binding.

public event PostBackEventHandler InitializePostBack

Occurs when when OnTheFlyPostBack action needs to be initialized.

public event RowEventHandler InitializeRow

Occurs when a row is being initialized and about to be rendered.

Remarks

The InitializeRow event allow you to modify the cell's content and styles before it goes to rendering. This is especially useful to write Custom Column, validate a specific condition and add rich HTML-based contents.

public event DataSourceEventHandler PrepareDataBinding

Occurs when any data-related functionality is performed before the combo renders data.

public event ValueChangedEventHandler ValueChanged

Occurs when the value is changed.

Remarks

This event is called by method.
  • No labels