Adding New item and then calling CommitEdit adds a new empty row

3 posts, 0 answers
  1. Shilpi
    Shilpi avatar
    5 posts
    Member since:
    May 2012

    Posted 30 Jan 2014 Link to this post

    Hi -

    I am using NewRowPosition so that the user would have the ability to create a new row by "Click to add new data item", but I populate that row in BeginningEdit and then I want to finish editing so I call CommitEdit from BeginningEdit, but that calls RowEditEnded (which I expect), and also adds a new empty row (which I do not expect)? Am I missing something here?

    Thanks, Shilpi
  2. Shilpi
    Shilpi avatar
    5 posts
    Member since:
    May 2012

    Posted 06 Feb 2014 Link to this post

    Anything yet?
  3. DevCraft banner
  4. Hristo
    Admin
    Hristo avatar
    41 posts

    Posted 07 Feb 2014 Link to this post

    Hello Shilpi,

    I am sorry for the late answer. The solution to your issue is to set the default values for new item during the event AddingNewDataItem. More information on how to insert new rows to the gridview can be found in this article. I have also attached a sample project demonstrating this approach.

    Regards,
    Hristo
    Telerik

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Back to Top