In WebCombo, you can use OnAddItem Client-side event to validate input.
This topic will show you how to use OnAddItem client side event.
To validate input using OnAddItem Client-side event
- Right click the WebCombo instance and choose WebCombo.NET Designer.
- Set OnAddItem to "DoAdd" in Advanced Settings - LayoutSettings - ClientSideEvents.
- In HTML view, put the following function:
JavaScript Copy Code function DoAdd(controlId) { var combo = ISGetObject(controlId); if(combo.TextObj.value == "Brad") { return True; } else { return false; } }
- Run the project.
Tasks
How-to: AlowAddItem in WebCombo
How-to: Add item in bound WebCombo
How-to: Add item in unbound WebCombo from server side
How-to: Add item in unbound WebCombo from client side
FAQ: How to implement adding item in WebCombo when we set AllowAutoPostBack and AllowAddItem to true?
Concepts
Dynamically Add Item
References
ClientEvents Class
OnAddItem Property