OK. I have a WebCombo that I bind to a DataSet at runtime. I would like to enable AJAX conditional downloading of the text/values.
I know that I must set the attribute EnableXmlHTTP = true, and somehow handle the InitializeDataSource event. I'm stumped at what I'm supposed to do when handling that event.
I tried to handle that method with a routine that called DataBind if DataSource was not null, but that didn't work.
I'm hoping that there is something simple that I can do to implement this functionality, rather than having to implement my own AJAX framework.
In the combo's InitializeDataSource event, you need to populate the object you'll use for the combo's data source, and set that object to the combo's DataSource property (assuming that its DataSource isn't already set to this object). Typically, this is where you'd fill a DataSet or populate a list of custom business objects.
You want to avoid calling DataBind() in this event handler. If you handle this event, then DataBind() will be called implicitly when the event has completed.