Skip to end of metadata
Go to start of metadata

In addition to built-in client services, you can also programmatically create your own datasource entirely in the client-side, then bind it to the WebCombo via client API. This mode is called ClientDataSource.

This topic shows how to bind WebCombo to client-side Data Source.

To bind WebCombo to Client-side Data Source

  1. Select an instance of WebCombo in designer surface.
  2. Press F4 to bring up the Property Window.
  3. Set  BindingOperationMode  to  ClientBinding .
  4. Expand ClientBindingSettings and set DataSourceType property to ClientDataSource.
  5. Set DataTextField to "Text".
     
  6. Set DataValueField to "ID".
     
  7. Open WebCombo Designer, select Data Source from the left navigation. Tick the Enable Multiple Columns checkbox.
     
  8. From the WebCombo Designer, select Columns from the left navigation. Add a column with following detail:

    PropertyValue
    NameText
    BaseFieldNameText
    HeaderTextItem Text



     

  9. Repeat above step and add another column with following detail: 

    PropertyValue
    NameDesc
    BaseFieldNameDesc
    HeaderTextItem Description
    Width120

     

  10. Create a function called CreateData(). In the function, there are several things that need to be configured.
  11. First of all, create a DataTable using the following code:

    JavaScript
  12. Then, set up the data columns like following:

    JavaScript
  13. Next, add the created columns to the data table:

    JavaScript
  14. The columns has been set. Now, add rows to the data table like following:

    JavaScript
  15. Everything has been configured. Finally, bind the data table to WebCombo.

    JavaScript
  16. The CreateData() function has been completed. You can invoke this function using any control, such as using HTML Input Button's OnClick event.

    JavaScript