This project is read-only.

Binding a DataTable to the Grid

May 28, 2009 at 10:18 AM


Can you please provide me with the information on how can I bind a DataTable to the grid in the AjaxDataControls?

Also, I need that the columns get auto-generated from the datatable that i provide? (the datatable is returned from my web service).




Dec 16, 2010 at 10:32 AM

You can't.

The DataTable class is very complex to be serialized into a JSON object.

Instead you can create a class to put the row informations and return a array of objects of this class in your web service.

Mar 31, 2011 at 2:50 PM

You actually can do it. Just return the dataTable from your webservice or pagemethod and use the below code: