Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Help a newb with enabling AJAX on a WebCombo
posted

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.

Parents
  • 45049
    posted

    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.

Reply Children