Binding data to Rad grid at runtime

2 posts, 0 answers
  1. Linda
    Linda avatar
    1 posts
    Member since:
    Sep 2010

    Posted 20 Sep 2010 Link to this post

    Hi is there anyone who knows how i can bind data to a grid at runtime and be able to edit the grid and submit changes to the database.Reason why i need to bind at runtime is because the number of columns in my dataset varies all the time. Thank you.
  2. Tsvetoslav
    Tsvetoslav avatar
    1823 posts

    Posted 22 Sep 2010 Link to this post

    Hello Linda,

    Binding RadGrid at runtime is straightforward. Just assign the given data to the grid's DataSource property and call its Rebind() method. If the column fields in your dataset vary, you might as well set AutoGeneratedColumns=true for the grid. To edit/update/insert items into the underlying data-source, attach event handlers to the corresponding grid commands and handler the operations manually as explained in the related topic:

    Hope it helps.

    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top