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

Get Last Inserted Object with primary key

2 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Farid Hayati
Top achievements
Rank 1
Farid Hayati asked on 11 Mar 2011, 12:50 PM
I want get my last inserted row with the primary key. How can I do that.  

I am using radgrid with linqdatasource with automatic insert operation. 

I don't want  do it with select query to database to get the last inserted row.  If multiple people doing insert from different places I will get wrong data. 


Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 16 Mar 2011, 02:49 PM
Hello Farid,

This functionality isn't in the scope of RadGrid. However you can use the approach as in the following forum thread:
http://forums.asp.net/p/1556507/3828130.aspx

Greetings,
Nikolay
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Farid Hayati
Top achievements
Rank 1
answered on 16 Mar 2011, 06:17 PM
Thanks a lot, I already found the same solution. 
Tags
Grid
Asked by
Farid Hayati
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Farid Hayati
Top achievements
Rank 1
Share this question
or