Statically & Dynamically defined RadGrid Columns

2 posts, 0 answers
  1. Adam
    Adam avatar
    3 posts
    Member since:
    Feb 2015

    Posted 04 Feb Link to this post

    Hi, 

    I want to create a RadGrid that is statically defined in the ASPX with some columns defined.  But also want to add (generically or programmatically) additional columns to the RadGrid (to the right of the already defined columns) dynamically based on the result set returned from a stored procedure. Finally, I want all columns to have full filter/sorting capabilities.

    Is there a way I can achieve this?

    NOTE: In the past, I have already created a programmatically defined RadGrid (in a older version of the RadGrid) by defining the complete grid structure, filters, events etc. in the Page_Init event (which was a lot of work).  I would like to know if there are easier ways to achieve this now in the latest versions of the RadGrid? 

    Kind Regards

    Dan
  2. Eyup
    Admin
    Eyup avatar
    3012 posts

    Posted 09 Feb Link to this post

    Hi Dan,

    Your assumption is correct. Combining programmatically created columns with declaratively defined columns in the mark-up is not supported. Please create the entire grid in the code-behind during Page_Init:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/creating-a-radgrid-programmatically#creating-the-grid-entirely-in-the-code-behind

    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top