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






Gets or sets the entry behavior of WebCombo. Gets or sets the entry behavior of WebCombo.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Gets or sets the entry behavior of WebCombo.")>
<ISNet.Serialization.BinarySerializableAttribute()>
<ISNet.Serialization.XmlSerializableAttribute()>
<NotifyParentPropertyAttribute(True)>
<DefaultValueAttribute()>
Public Property EntryMode As EntryMode
Visual Basic (Usage)Copy Code
Dim instance As LayoutSet
Dim value As EntryMode
 
instance.EntryMode = value
 
value = instance.EntryMode
C# 
[DescriptionAttribute("Gets or sets the entry behavior of WebCombo.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
public EntryMode EntryMode {get; set;}
Delphi 
public read-write property EntryMode: EntryMode; 
JScript 
DescriptionAttribute("Gets or sets the entry behavior of WebCombo.")
ISNet.Serialization.BinarySerializableAttribute()
ISNet.Serialization.XmlSerializableAttribute()
NotifyParentPropertyAttribute()
DefaultValueAttribute()
public function get,set EntryMode : EntryMode
Managed Extensions for C++ 
[DescriptionAttribute("Gets or sets the entry behavior of WebCombo.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
public: __property EntryMode get_EntryMode();
public: __property void set_EntryMode( 
   EntryMode value
);
C++/CLI 
[DescriptionAttribute("Gets or sets the entry behavior of WebCombo.")]
[ISNet.Serialization.BinarySerializableAttribute()]
[ISNet.Serialization.XmlSerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
public:
property EntryMode EntryMode {
   EntryMode get();
   void set (    EntryMode value);
}

Example

 

The following sample code shows you how to configure the EntryMode to InstantLookUp programmatically.
C#Copy Code
WebCombo1.LayoutSettings.EntryMode = EntryMode.InstantLookup;

Remarks

WebCombo.NET now 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"

  1. "299980" is typed in the WebCombo's textbox (any combination of one or more characters). WebCombo will not perform any search at this step.
  2. Pressing Enter or Tab key fires "InitializeDataSource" event.
  3. 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.
  4. 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).

Note 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.

To learn more and give you more illustration please read Entry Mode.

Starting from SP2 (Build 20), 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"

  1. "299980" is typed in the WebCombo's textbox (any combination of one or more characters). WebCombo will not perform any search at this step.
  2. Pressing Enter or Tab key fires "InitializeDataSource" event.
  3. 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.
  4. 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.

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.