Index out of range error - no RefreshEdit()

2 posts, 0 answers
  1. Gone2TheDogs
    Gone2TheDogs avatar
    22 posts
    Member since:
    May 2016

    Posted 31 Oct Link to this post

    The original grid was a standard item grid.  After the item number was entered, I did a dgvItems.RefreshEdit() to commit the change and make the new row accessible.

    The telerick datagrid does not have the RefreshEdit() function and I have not been able to find an equivalent function.  When I access e.RowIndex or dgvItems.CurrentRow.Index, it returns -1.  In addition, if I try to access the new row, I get an index out of range error.

    What is the proper method for the row index so that it does not return -1.

     

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 01 Nov Link to this post

    Hi Bob,

    Thank you for writing.

    You can set the AddNewBoundRowBeforeEdit property in order to add the new row to the underlying data source directly. Detailed information is available here: New Row.

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top