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






This event is fired when an item is about to be added. This event fired when an item is about to be added.

Syntax

Visual Basic (Declaration) 
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")>
<ISNet.EventParameterAttribute("controlId")>
<NotifyParentPropertyAttribute(True)>
<DescriptionAttribute("This event fired when an item is about to be added.")>
<DefaultValueAttribute()>
Public Property OnAddItem As String
Visual Basic (Usage)Copy Code
Dim instance As ClientEvents
Dim value As String
 
instance.OnAddItem = value
 
value = instance.OnAddItem
C# 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.EventParameterAttribute("controlId")]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("This event fired when an item is about to be added.")]
[DefaultValueAttribute()]
public string OnAddItem {get; set;}
Delphi 
public read-write property OnAddItem: String; 
JScript 
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")
ISNet.EventParameterAttribute("controlId")
NotifyParentPropertyAttribute()
DescriptionAttribute("This event fired when an item is about to be added.")
DefaultValueAttribute()
public function get,set OnAddItem : String
Managed Extensions for C++ 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.EventParameterAttribute("controlId")]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("This event fired when an item is about to be added.")]
[DefaultValueAttribute()]
public: __property string* get_OnAddItem();
public: __property void set_OnAddItem( 
   string* value
);
C++/CLI 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ISNet.WebUI.Design.ClientSideEventEditor, ISNet.WebUI.Design")]
[ISNet.EventParameterAttribute("controlId")]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("This event fired when an item is about to be added.")]
[DefaultValueAttribute()]
public:
property String^ OnAddItem {
   String^ get();
   void set (    String^ value);
}

Example

The folowing example shows you how to display confirmation box after user has added a value on a WebCombo.
C#Copy Code
WebCombo1.LayoutSettings.ClientSideEvents.OnAfterAdd = "DoAddItem";
The following is the example of the javascript function that is assigned in above event.
JScriptCopy Code
function DoAddItem() 
   {
      var combo = ISGetObject(controlId);
      if (confirm("The customer '" + combo.TextObj.value + "' is not exist. Do you want to add it?")) 
      return true;   
   }

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.