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

[Solved] LINQ into RadGrid

3 Answers 535 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Missing User
Missing User asked on 06 Mar 2008, 01:34 PM
Hi all,

Still learning the RadControls, especially the RadGrid at the moment.


I am developing a website with a number of grids on it.  Each grid is populated using LINQ to SQL.  I am more than happy doing this and it works well.

My problem is the insert/update/delete process.  I have looked at a few examples on the live demonstrations and searched through the relevant chm files but I cannot find anything that tells me how I should be going about my insert/update/deletes.

First of all, I have a few questions if anyone has a spare 5 minutes to help me understand this properly (or can point me to documentation that covers it):
  1. What is the difference between using the AutoGenerateDeleteColumn/AutoGenerateEditColumn and creating one manually in the Columns tag?
  2. Can someone explain the difference between all the different Insert/Update/Delete events:
  3. What are the OnDeleteCommand / OnEditCommand / OnUpdateCommand / OnInsertCommand for - when are they triggered?
  4. What are the OnItemCreated / OnItemInserted / OnItemUpdated / OnItemDeleted events and when are they triggered?
  5. Has anyone got any specific pointers or tips on how to integrate the RadGrid with LINQ to SQL (specifically when using StoredProcedures to perfrom the SELECT / INSERT / UPDATE / DELETE commands?
Many thanks in advance, any help greatly appreciated!


Drammy

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 06 Mar 2008, 07:39 PM

Anyone...

0
Vlad
Telerik team
answered on 07 Mar 2008, 04:24 PM
Hi Martyn,

You can use ObjectDataSource to achieve this. Please check this article:
http://www.telerik.com/community/code-library/submission/b311D-kemte.aspx

In this case there will be no need to handle event such ItemCommand, UpdateCommand, etc.
ItemCreated is fired when an item is created and OnItemInserted / OnItemUpdated / OnItemDeleted when indicates successful finished operation from the DataSourceControl.

AutoGenerateDeleteColumn/AutoGenerateEditColumn are for convenience only - columns will be created automatically if these are true.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Missing User
answered on 08 Mar 2008, 02:24 AM
Thats great, thanks a lot for your help.


Drammy
Tags
Grid
Asked by
Missing User
Answers by
Missing User
Vlad
Telerik team
Share this question
or