Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataTable as Declarative Data Source?

I am using a Telerik's Grid that unveils its potential if it's bout to a declarative data source. However I do not have a need to create a database table but just would like to use standard DataTable as my data storage.

The component item I want to use does require DataSource for binding. (GridDropDownColumn in Telerik RadGrid).

Is there a way to make a Data Source (suitable for decralative binding to components) that uses a simple DataTable as storage?

like image 849
onkami Avatar asked Apr 21 '26 12:04

onkami


1 Answers

Yes there is.

Simply use an ObjectDataSource. In its selectMethod, point it to a method in your codebehind (or any where else) that returns your DataTable.

like image 97
scartag Avatar answered Apr 23 '26 01:04

scartag