New row behavior

5 posts, 0 answers
  1. Frank Beerens
    Frank Beerens avatar
    26 posts
    Member since:
    Jan 2010

    Posted 08 Oct 2014 Link to this post

    Hi,

    I want to achieve the same 'new row behavior' as the default windows gridview.
    That means that if I edit a cell in the 'new row', the row is also added to the datasource and is a 'real' row instead of a 'new row'. Now this only can be achieved by pressing enter or set the focus to another row.

    Best regards
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 13 Oct 2014 Link to this post

    Hello Frank,

    Thank you for writing.

    In some cases, you may need RadGridView to create a record in the underlying data source after the end-user commits the new row. In other cases, you may want to have a new record created immediately after the end-user starts editing the new row. RadGridView supports both modes. The behavior of RadGridView in this situation is determined by the AddNewBoundRowBeforeEdit property. You can refer to our GridView >> New Row help article >> Adding rows to the underlying data source section which is quite useful about this topic.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Frank Beerens
    Frank Beerens avatar
    26 posts
    Member since:
    Jan 2010

    Posted 15 Oct 2014 Link to this post

    Thank you, that got me in the right direction.
    The problem I now have is that I use a custom listviewsource, as described in http://www.telerik.com/help/winforms/gridview-populating-with-data-binding-to-a-collection-of-interfaces.html

    When I click on the 'new row' now, two rows are added and the last one is in edit mode.
  5. Frank Beerens
    Frank Beerens avatar
    26 posts
    Member since:
    Jan 2010

    Posted 16 Oct 2014 Link to this post

    After some further investigation I found out the problem occurs when using a observablecollection as datasource.

    How to reproduce:
    Add a new row, fill in any value, press enter so a new line is created and click any existing cell.

    I cannot attach an example project here, I created a bug report: 869683
  6. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 20 Oct 2014 Link to this post

    Hello Frank,

    Thank you for writing.

    As my colleague, Dimitar, confirmed in the other thread that you have opened, it is an issue with our RadGridView. Here is the feedback item for your reference. The fix will be introduced in Q3 2014 which is scheduled for the end of October. Until then, the possible solution is to use BindingList instead of ObservableCollection.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready