Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling
5 replies. Latest Post by Duc Hong on November 5, 2009.
(0)
Duc Hong
Member
3 points
3 Posts
10-24-2009 8:51 PM |
Hi, Wondering if anyone has tried nested a Datagrid inside a Datagrid with the nested Datagrid requiring vertical scroll bar. I have forced the scroll bar to appear in the Nested Datagrid but it still is not functional. Just wanted to know if this is a limitation,bug or is there a way around it? Thanks in Advance, Duc
varshavmane
Contributor
6739 points
1,583 Posts
10-25-2009 11:02 AM |
What functionality you want? Even I'm using Datagrid inside DataGrid.RowDetailsTemplate and it works fine.
ewinthe
12 points
1 Posts
10-26-2009 8:52 AM |
I have the same problem.
Solved the vertical scrollbar problem by setting the detailgrid height explicitly.
But I'm still having problems with horizontal scrollbar.
yifung
3315 points
541 Posts
10-26-2009 9:20 PM |
The nested DataGrid will grow as tall as it needs to to display all its items unless it's constrained in height. Its Width by default will be the width of all the columns in the outer DataGrid, and it scrolls horizonally with the Row. If you want the width of the nested DataGrid to be only as wide as width that the outer DataGrid is taking up (not the width of the columns combined), you can set the AreRowDetailsFrozen property to true. This will make the nested DataGrid as wide as what you can see at one time, and your row details will now scroll when the out DataGrid's horizontal scrollbar is scrolled
sri567
7 points
28 Posts
11-04-2009 2:05 PM |
Hi I am nesting a data grid inside Data Grid row Details Template. I am facing a problem when i bind different classes to the parent grid and nested one. The nested one doesn't recognize the binding. Did anyone face this issue? Thanks Sri
11-05-2009 9:54 PM |
I had no problems doing it. Using a master-detail setup.
In my Outer Datagrid binding class I have a property that returns a list of detail business objects for my nested datagrid then in the xaml file I would bind my nested datagrid to it. e.g.
<data:DataGrid x:Name="OuterDataGrid" >
So each Object binded to the OuterDataGrid I have a property called DetailsDataObjectsList which would return a list of detail data objects whenever a row on the outer datagrid was selected.