This is a migrated thread and some comments may be shown as answers.

GridViewNewRow content is not scrollable

5 Answers 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 25 Mar 2015, 09:42 AM
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 !

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 27 Mar 2015, 08:07 AM
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.

 
0
Sebastian
Top achievements
Rank 1
answered on 30 Mar 2015, 10:24 AM
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
0
Maya
Telerik team
answered on 01 Apr 2015, 12:22 PM
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.

 
0
Sebastian
Top achievements
Rank 1
answered on 01 Apr 2015, 12:34 PM
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
0
Maya
Telerik team
answered on 02 Apr 2015, 12:36 PM
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.

 
Tags
GridView
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Maya
Telerik team
Sebastian
Top achievements
Rank 1
Share this question
or