Sometimes you may want to change the data source programmatically, using JavaScriptâ„¢ or Javaâ„¢, perhaps when a user clicks on a button. The following example shows an example using the Blox JavaScript setDataSourceName method: