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.
1 Answer, 1 is accepted
0
Tsvetoslav
Telerik team
answered on 22 Sep 2010, 09:12 AM
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: http://www.telerik.com/help/aspnet/grid/grdinsertupdatedeleteatdatabaselevel.html
Hope it helps.
Greetings,
Tsvetoslav
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