This is a migrated thread and some comments may be shown as answers.

Binding data to Rad grid at runtime

1 Answer 84 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Linda
Top achievements
Rank 1
Linda asked on 20 Sep 2010, 08:16 AM
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

Sort by
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
Tags
Ajax
Asked by
Linda
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or