Sometimes when you enable AllowAddItem and AllowAutoPostBack, you missed to create WebCombo_AddItem server side event. In this case, an error will occur because AddItem event is called but there is no event to handle this task. In this situation, you should create WebCombo_AddItem server side event.
For example:
| C# | Copy Code |
protected void WebCombo1_AddItem(object sender, ISNet.WebUI.WebCombo.RowEventArgs e
{
// get cached data from data source control
DataView view = this.EmployeeDataSource.Select(DataSourceSelectArguments.Empty) as DataView;
// update the cached data
DataTable table = view.Table;
DataRow newRow = table.NewRow();
newRow["FirstName"] = e.Row.Value;
table.Rows.Add(newRow);
} | |
Copy Code