2017-11-09 11 views
0

こんにちは、Stackoverflowメンバー、Datagrid - ItemsPresenter - vertical Scrollviewer

私は新しいです!短時間ですみません、申し訳ありません。しかし、私はあなたの助けが必要です! 私は2000行のDatagridを持っています。

vb.net
Dim grouped As New ListCollectionView(full_list)
grouped.GroupDescriptions.Add(New PropertyGroupDescription("CustNbr"))
Datagrid.ItemsSource = grouped

を(CustomerNbrにグループ化された)このコードは、

<DataGrid.GroupStyle> 
    <GroupStyle> 
     <GroupStyle.HeaderTemplate> 
      <DataTemplate> 
       <StackPanel> 
        <TextBlock Text="{Binding Path=Name}" /> 
       </StackPanel> 
      </DataTemplate> 
     </GroupStyle.HeaderTemplate> 
     <GroupStyle.ContainerStyle> 
      <Style TargetType="{x:Type GroupItem}"> 
       <Setter Property="Template" > 
        <Setter.Value> 
         <ControlTemplate TargetType="{x:Type GroupItem}"> 
          <Expander MaxHeight="400" FontWeight="Bold" Background="{Binding Path=Items, Converter={StaticResource convert_Backcolor}}" > 
           <Expander.Header> 
            <StackPanel Orientation="Horizontal" > 
             <TextBlock Text="{Binding Path=Name}" Margin="10,0,10,0" /> 
             <TextBlock Text="{Binding Path=Items, Converter={StaticResource convert_Cust_Name}}" MinWidth="300" Margin="10,0,10,0" /> 
             <TextBlock Text="{Binding Path=Items, Converter={StaticResource convert_Summe},ConverterCulture=de-DE, StringFormat={}{0:n2}}" HorizontalAlignment="Right" Margin="40,0,0,0" /> 
            </StackPanel> 
          </Expander.Header> 
           <ItemsPresenter /> 
         </Expander> 
        </ControlTemplate> 
        </Setter.Value> 
       </Setter> 
      </Style> 
     </GroupStyle.ContainerStyle> 
    </GroupStyle> 
</DataGrid.GroupStyle> 

うまく働いたが、私はItemsPresenterでScrollViewerのを追加するとき、私はエラーを取得:

<ScrollViewer> 
    <ItemsPresenter /> 
</ScrollViewer> 

エラーを私が2番目にグループ化されたカストゥンブを作るときに来る。 screen

エラー:invalidOperationExeptionは私がCustNbrに非常に多くの請求書を持っているので、私はScrollViewerのを必要とする未処理の

ました。問題は拡大にあります。 Expander.Contentでは、垂直のScrollViewerはサポートされていません。

誰でも助けてくれますか?

答えて