Search code examples
asp.netdata-bindingcollectionstelerik

Databinding Generic Collection vs Datatable,


How costly is databinding a collection of objects to a grid (telerik gridview to be specific) vs a regular datatable,

I wouldnt have thought it was an issue but I am doing the databinding via a webservice AJAX callback and if the grid has more than 20 rows it starts to take a noticable time to bind,


Solution

  • I read somewhere (do not remember where exactly) that generally binding to DataTable is more resources/time consuming than binding to a collection of objects.

    I used the Telerik grid some time ago and know that it supports binding to a collection of objects and even sub-objects. During the evaluation I found an example and a help topic that explain how to fine-tune the binding to collections and I am pasting them here:

    Demo

    Help topic