Skip to main content

Microsoft Silverlight

Answered Question Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrollingRSS Feed

(0)

Duc Hong
Duc Hong

Member

Member

3 points

3 Posts

Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

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
varshavmane

Contributor

Contributor

6739 points

1,583 Posts

Re: Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

What functionality you want? Even I'm using Datagrid inside DataGrid.RowDetailsTemplate and it works fine.

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog: http://varshavmane.blogspot.com/

ewinthe
ewinthe

Member

Member

12 points

1 Posts

Answered Question

Re: Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

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
yifung

Contributor

Contributor

3315 points

541 Posts

Microsoft

Re: Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

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

Yifung Lin [MSFT]

sri567
sri567

Member

Member

7 points

28 Posts

Re: Re: Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

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

Duc Hong
Duc Hong

Member

Member

3 points

3 Posts

Re: Re: Datagrid nested in DataGrid.RowDetailsTemplate of another Datagrid will not allow scrolling

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" >

.............

     <data:DataGrid x:Name="NestedDataGrid" ItemsSource="{Binding DetailsDataObjectsList}">

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.

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities