I will go through each of the code samples an explain the differences:
The above syntax is used to change the DataSource of an already initialized ListView. The most important thing here is that you already have an initialized widget with DataSource.
This syntax is used to attach DataSource instance to ListView during the initialization of the widget. The DataSource must be defined as a global variable. This is equivalent to:
And the third case:
This example uses the MVVM design pattern, which means that you need to have dataSource defined as a field in the ViewModel. Also the View should be bound to a ViewModel via data-model attribute.
I hope that this information will be helpful, but if you have any further questions do not hesitate to contact us back.
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI