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

Grid automatic Insert/Update/Delete with List<MyClass> datasource

4 Answers 148 Views
Grid
This is a migrated thread and some comments may be shown as answers.
qunwei
Top achievements
Rank 1
qunwei asked on 24 Sep 2008, 10:38 PM
In the demo of RadGrid for ASP.NET AJAX, there is Insert/Update/Delete - automatic operations, so user can do insert/update/delete without writing any code behind. The data source used there is SessionDataSource. In the description, it says this can also be used for AccessDataSource, SqlDataSource or ObjectDataSource.
But I am going to use a generic list like List<MyClass> in memory as my data source. How can I still implement the automatic Insert/Update/Delete functions?
Thanks a lot.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Sep 2008, 07:03 AM
Hi Q,

You can use ObjectDataSource to achieve this. The grid will support automatic operations only if you bind it to a ASP.NET DataSourceControl.

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
qunwei
Top achievements
Rank 1
answered on 25 Sep 2008, 02:06 PM
Hi, Vlad,

Thank you.

Do you have examples showing how to use ObjectDataSource with automatic Insert/Update/Delete? Since I am newbie, I don't know how to do it.

Also, before I saw your reply I was trying to do automatic Insert/Update/Delete with LinqDataSource, is it possible?

Thanks.

Q
0
Sebastian
Telerik team
answered on 25 Sep 2008, 02:08 PM
Hello Q,

Here are a couple of code library projects which can get you started:

http://www.telerik.com/community/code-library/submission/b311D-kemte.aspx
http://www.telerik.com/community/code-library/submission/b311D-bcmcht.aspx

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
qunwei
Top achievements
Rank 1
answered on 25 Sep 2008, 03:03 PM
Hi, Stephen ,
Thank you very much!
Q
Tags
Grid
Asked by
qunwei
Top achievements
Rank 1
Answers by
Vlad
Telerik team
qunwei
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or