Dynamic data source

3 posts, 1 answers
  1. yigal
    yigal avatar
    4 posts
    Member since:
    Dec 2013

    Posted 13 Jul 2016 Link to this post


    I have a Telerik grid that I need to be filled dynamicly.

    I have a menu which is also dynamic, each item of the menu represented by a unique number, according to this number I know which SQL query to run and fill the grid accordingly.

    The grid should have the options for: Insert, Update, Delete.

    The grid should also have the option of filtering.

    I need to change the columns headers as well at runtime while filling the grid.

    What is the best way to implement those needs? 




  2. Answer
    Viktor Tachev
    Viktor Tachev avatar
    1595 posts

    Posted 15 Jul 2016 Link to this post

    Hi Eliran,

    The RadGrid control can generate its columns based on the available data. You can use that feature and have the grid use autogenerated columns.

    As for the Update/Insert/Delete functionality. The grid supports automatic data source operations when it is bound to a declarative DataSource control. Check out the following article that describes the behavior in more detail:

    In case you need more advanced features you can also define the RadGrid structure manually. In order to change the structure of the grid dynamically you would need to create it in the code-behind using the Page_Init event. The article below outlines the approach you can use.

    Viktor Tachev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. yigal
    yigal avatar
    4 posts
    Member since:
    Dec 2013

    Posted 17 Jul 2016 in reply to Viktor Tachev Link to this post

    Thanks Viktor

    All problems have been solved when I change the Grid initialization from the Page_Load event to Page_Init.


Back to Top