autoBind Boolean (default: true)

If set to false, the Grid will not bind to the data source during initialization, i.e. it will not call the fetch method of the dataSource instance. In such scenarios data binding will occur when the change event of the dataSource instance is fired. By default, autoBind is set to true and the widget will bind to the data source specified in the configuration.

Setting autoBind to false is useful when multiple widgets are bound to the same data source. Disabling automatic binding ensures that the shared data source doesn't make more than one request to the remote service.

Example - disable automatic binding

<div id="grid"></div>
var dataSource = new{
  data: [ { name: "Jane Doe" }, { name: "John Doe" }]
  autoBind: false,
  dataSource: dataSource
});; // "read()" will fire the "change" event of the dataSource and the widget will be bound
In this article