GridViewNewRow content is not scrollable

6 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    3 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 Link to this post

    Hello there folks,

    I have an issue with a RadGridView and GridViewNewRow.

    I have a RadGridView bound to an Itemssource (ICollection). Every row is expandable with a DetailsTemplate for Read-Only and Edit. So far everything works fine. Problems arise when I enable the "NewRow" option of the GridView.

    The GridViewNewRow uses the same DetailsTemplate as the Edit Template but for some strange reason the built-in ScrollViewer of RadGridView works differently for the GridViewNewRow. The content of the GridViewNewRow gets recognized and shown (all Height and Width properties are set to Auto/NaN), but the content is not scrollable, so if the new row gets activated near the bottom of the GridView, the content flows outside of the visible area and you have no possibility to focus it there.

    Expanding the DetailsTemplate of the Read-Only or Edit Template works perfectly with the scrolling. So basically you can add a new row on the bottom of the GridView and you can only see half of the content, then you commit the row and go to edit mode of the same row (which uses exactly the same template) and you can scroll like a young god. I added two pictures showing the explained behavior, GridViewNewRow without the ScrollBar and GridViewRow with the ScrollBar, both using the same template with the same data, but one working and the other not so much.

    I did some digging inside the properties and saw that the IScrollInfo.ExtentHeight of the RadGridView does not recognize the expanding of the Details Template of the GridViewNewRow while it does recognize the expanding of the GridViewRow. So there might be some error at this point. I attach an event handler to the "AddingNewDataItem" in the RadGridView to set the DataContext, but otherwise everything is out-of-the-box "Telerik" usage and I never enable/disable the ScrollViewer in any way.

    Any ideas where the problem might be? Is there some property you have to set for GridViewNewRow?

    Thanks !
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 27 Mar 2015 Link to this post

    Hello Sebastian,

    I tried to reproduce the behavior, but without success. Do you have GroupRenderMode property to "Flat", what is the value of NewRowPosition ? 
    Generally, the element inside the RowDetails is measured with infinity so that whatever you place inside can be visualized appropriately. 


    Regards,
    Maya
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Sebastian
    Sebastian avatar
    3 posts
    Member since:
    Mar 2015

    Posted 30 Mar 2015 in reply to Maya Link to this post

    Hi Maya,

    GroupRenderMode is set to "Flat" and NewRowPosition is set to "Bottom". 

    Don't get me wrong, the element inside the RowDetails is visualized correctly. If you maximize the window you can see the element being styled exactly as it should be, the properties in ActualHeight and ActualWidth are correct as well. The problem is that the scrollviewer of the grid does not recognize the DetailsTemplate being shown of the GridViewNewRow while it does recognize the same DetailsTemplate for the GridViewRow. It seems to me the DetailsTemplate of the GridViewNewRow doesn't propagate its height to the parent grid. Is that possible? The styles from GridViewRow & GridViewNewRow are standard.


    Thanks,
    Sebastian
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 01 Apr 2015 Link to this post

    Hi Sebastian,

    I managed to reproduce an issue. Could you take a look at the project attached in order to verify we are on the same page and talking about the same problem ? 
    Once I insert a new item, the vertical scroll bar is not remeasured appropriately based on the expanded RowDetails. 

    Regards,
    Maya
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  5. Sebastian
    Sebastian avatar
    3 posts
    Member since:
    Mar 2015

    Posted 01 Apr 2015 Link to this post

    Hi Maya,

    yes, this looks exactly like the problem I face. Am I doing something wrong? Or is there a workaround for this problem?


    Thanks,
    Sebastian
  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 02 Apr 2015 Link to this post

    Hello Sebastien,

    Actually, it turns out to be a bug. I resolved it and once our QA procedures are passed, the fix will be available in one of our internal releases. You can follow the progress of the item in our feedback portal

    Regards,
    Maya
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top