Dynamic Grid Clientside binding

2 posts, 0 answers
  1. Sai
    Sai avatar
    1 posts
    Member since:
    Mar 2014

    Posted 28 May 2015 Link to this post

    Hi

    I am Creating a Grid dynamically. I dont know how many columns will be there it is based on the login user. 

    Is there any why to bind that Grid clientside?

     

    Thanks & Regards

    Saicharan.D

  2. Eyup
    Admin
    Eyup avatar
    3784 posts

    Posted 02 Jun 2015 Link to this post

    Hi Saicharan,

    Generally, RadGrid supports client-side binding, however, this scenario does not support autogenerated columns:
    http://www.telerik.com/forums/autogeneratecolumns-and-client-binding#sPYF6DnlM0WW9sTWuu3NZw

    The grid columns should be created on the server-side. You can achieve that by simply providing your data source using the NeedDataSource event handler provided by RadGrid and enable the AutoGenerateColumns property:
    http://www.telerik.com/help/aspnet-ajax/grid-advanced-data-binding.html

    Alternatively, you can create and configure your columns programmatically:
    http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html#Section22

    Here you can find a similar scenario:
    http://www.telerik.com/help/aspnet-ajax/grid-changing-structure-dynamically.html

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