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






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

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

Syntax

Visual Basic (Declaration) 
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<DefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
<DescriptionAttribute("Specifies whether item addition is allowed when input text doesn't match any list items.")>
Public Property AllowAddItem As Boolean
Visual Basic (Usage)Copy Code
Dim instance As LayoutSet
Dim value As Boolean
 
instance.AllowAddItem = value
 
value = instance.AllowAddItem
C# 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Specifies whether item addition is allowed when input text doesn't match any list items.")]
public bool AllowAddItem {get; set;}
Delphi 
public read-write property AllowAddItem: Boolean; 
JScript 
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
DefaultValueAttribute()
NotifyParentPropertyAttribute()
DescriptionAttribute("Specifies whether item addition is allowed when input text doesn't match any list items.")
public function get,set AllowAddItem : boolean
Managed Extensions for C++ 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Specifies whether item addition is allowed when input text doesn't match any list items.")]
public: __property bool get_AllowAddItem();
public: __property void set_AllowAddItem( 
   bool value
);
C++/CLI 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Specifies whether item addition is allowed when input text doesn't match any list items.")]
public:
property bool AllowAddItem {
   bool get();
   void set (    bool value);
}

Example

 

The following example shows you how to use AllowAddItem feature using code- behind.
C#Copy Code
private void WebCombo1_InitializeLayout(object sender, ISNet.WebUI.WebCombo.LayoutEventArgs e)
{
   e.Layout.AllowAddItem = true;
}

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.

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

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.