I have bind my GridView with SQLDataSource and it is working fine. Now I have a method (this method is from a dll, so I can’t alter it) which returns DataTable and I have to assign this DataTable to SQLDataSource.
I am looking for something like this
SQLDataSource1.DataSource = MyDataTable;
I know there is no DataSource property in SQLDataSource, but I need similar kind of functionality.
If I set GridView1.DataSource = MyDataTable; then I loose all functionality of SQLDataSource like sorting, updating etc.
Code example will be helpful.
You can change from SqlDataSource to ObjectDataSource. That will allow you to call your method and still do paging
You can read more on ObjectDataSource and an more here