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

[Solved] NeedDataSource and ItemTemplate

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Telerikuser
Top achievements
Rank 1
Telerikuser asked on 17 Sep 2009, 09:19 PM
How do I avoid calling NeedDataSource during ItemCommand execution ie, insert, update and cancel?

Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Sep 2009, 05:42 AM
Hi,

The NeedDataSource is designed to help developers to follow a less-code approach. In the old MS DataGrid, inorder to perform an operation you should bind the grid in  Page_Load on initial load and then Handle events, provide DataSource again and DataBind() the grid again. In RadGrid you can handle NeedDataSource instead of other command events and RadGrid automatically resolves the DataSource when needed and will call DataBind(). You can find more explanation on this in the following forum link:
Is OnNeedDataSource Needed ?

Thanks
Princy.
Tags
Grid
Asked by
Telerikuser
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or