A DataSource has a rather self-explanatory name; however, a DataSource driver in context to the DataGrid can become a very essential key to your software. A DataSource driver will interact with your data source directly, such as a DB_DataObject or a MDB2 query and handle all of the paging and sorting code for you, resulting in very few lines of code that you will need to write.
The bind() method is able to autodetect the right driver
in many cases. For example, you can pass DB_Table
instances to it. Strings can't be autodetected because they could contain
CSV or XML data, for example. In such cases, you can specify the type as
the third parameter in the bind() method call (e.g.
If you are building your own custom DataSource driver, using bindDataSource() is the method of choice. Just instantiate your DataSource class and pass this instance to the bindDataSource() method.