In order to make things generic you can populate the grid in the NeedDataSource
event handler and set its AutoGenerateColumns
property to true
. That way the number of columns and the fields to which they are bound will be determined by the data source passed in the event handler. That said the only thing left to do is to construct a method which to return a different source for the grid(which depends on the specific requirements) and call it in the NeedDataSource
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.