Get ID of inserted record.

3 posts, 0 answers
  1. Jim
    Jim avatar
    22 posts
    Member since:
    Oct 2012

    Posted 07 Feb 2017 Link to this post

    I've searched the forums with no luck. 

    What I need to do is send an email with the ID of the newly inserted items ID that is generated from SQL(isIdentity)

    I was assuming that I could get this info from RadGrid1_ItemInserted but no luck.

    Dim editformItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
    Dim test As String = editformItem.Item("Task_Id").Text


    I need the id of the inserted item.

    Can someone please help.

    Thank you


  2. Jim
    Jim avatar
    22 posts
    Member since:
    Oct 2012

    Posted 09 Feb 2017 Link to this post

    Anyone? Do I have to open a ticket?
  3. Eyup
    Eyup avatar
    4046 posts

    Posted 14 Feb 2017 Link to this post

    Hi Jim,

    When updating the item, the you can access the ID of the modified item since there is an actual grid item:

    When inserting, however, since there is no grid item generated at that time, the grid has no info about that record. Therefore, you should get this info from your database, for instance - using some event or query of the SQL data source.

    You can also check the provided explanation and web site sample here:

    I hope the clarification was helpful.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top