Statically & Dynamically defined RadGrid Columns

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

    Posted 04 Feb 2016 Link to this post


    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

  2. Eyup
    Eyup avatar
    3322 posts

    Posted 09 Feb 2016 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:

    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
Back to Top