Configure RadGrid data source in code behine

3 posts, 0 answers
  1. Perry
    Perry avatar
    62 posts
    Member since:
    Jul 2015

    Posted 30 Oct 2015 Link to this post

    With an ASP.net Gridview I set the select method in the C# code behind page, and use an IQueryable to access the data entity data to populate the Grid.  Is it possible to do this with the RadGridview or do I have to make that connection with the ASP code?  If so can someone provide instructions on how to do that or an example?
  2. Eyup
    Admin
    Eyup avatar
    3819 posts

    Posted 03 Nov 2015 Link to this post

    Hello Perry,

    Yes, the RadGrid provides NeedDataSource event handler for this purpose:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-binding/understanding-data-binding/server-side-binding/advanced-data-binding-%28using-needdatasource-event%29

    You can also check the following live sample:
    http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Perry
    Perry avatar
    62 posts
    Member since:
    Jul 2015

    Posted 03 Nov 2015 in reply to Eyup Link to this post

    Thanks that was just what I was looking for.
Back to Top