Intersoft WebCombo Documentation
ComboMode Property
See Also  Example Send Feedback
ISNet.WebUI.WebCombo Namespace > LayoutSet Class : ComboMode Property






Specifies the mode of the WebCombo control.

Specifies the mode of the WebCombo control.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<DescriptionAttribute("Specifies the mode of the WebCombo control.")>
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<NotifyParentPropertyAttribute(True)>
Public Property ComboMode As Mode
Visual Basic (Usage)Copy Code
Dim instance As LayoutSet
Dim value As Mode
 
instance.ComboMode = value
 
value = instance.ComboMode
C# 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies the mode of the WebCombo control.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public Mode ComboMode {get; set;}
Delphi 
public read-write property ComboMode: Mode; 
JScript 
DefaultValueAttribute()
DescriptionAttribute("Specifies the mode of the WebCombo control.")
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
NotifyParentPropertyAttribute()
public function get,set ComboMode : Mode
Managed Extensions for C++ 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies the mode of the WebCombo control.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public: __property Mode get_ComboMode();
public: __property void set_ComboMode( 
   Mode value
);
C++/CLI 
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies the mode of the WebCombo control.")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
public:
property Mode ComboMode {
   Mode get();
   void set (    Mode value);
}

Example

The following example shows you how to bind a WebCombo and configure the ComboMode to MultipleColumns programmatically.
C#Copy Code
private void WebCombo1_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)
{
    DataSet ds = new DataSet();
    oleDbDataAdapter1.Fill(ds,"Customers");
    e.DataSource =  ds;
    WebCombo2.DataTextField = "ContactName";
    WebCombo2.DataValueField = "CustomerID";
}

private void WebCombo1_InitializeLayout(object sender, ISNet.WebUI.WebCombo.LayoutEventArgs e)
{
    e.Layout.ComboMode = Mode.MultipleColumns;  
}

Remarks

The control will work as a normal dropdownlist control when it is set to SingleColumn (Default). In this mode, DataTextField and DataValueField 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. DataTextField 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 DataBind is called.

When set to SingleColumn (Default), the control will work as a normal dropdownlist control. In this mode, DataTextField and DataValueField will be used to display data. Other columns in DataSource are ignored.

When set to MultipleColumns, the control will show all columns by default. DataTextField 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 WebCombo.DataBind is called.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.