0

Is there any way to implement virtulization for Grid as Items Panel Template for Items Control

My requirement is need to display data in a table format so I am using grid as items panel template. as I am not using virtualstackpanel virtualization is not working.

<ItemsControl ItemsSource="{Binding ChildElements}">    
    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <Grid>
                <Grid.Tag>
                    <MultiBinding Converter="{StaticResource DecisionTableConditionStepsInitConveter}">
                        <Binding RelativeSource="{RelativeSource Self}" />
                        <Binding Path="StepModel.RowCount" />
                        <Binding Path="StepModel.ColCount" />
                    </MultiBinding>
                </Grid.Tag>
            </Grid>                                        
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
    <ItemsControl.ItemContainerStyle>
        <Style TargetType="{x:Type FrameworkElement}">
            <Setter Property="Grid.Row" Value="{Binding RowIndex}" />
            <Setter Property="Grid.RowSpan" Value="{Binding RowSpan}" />
            <Setter Property="Grid.ColumnSpan" Value="{Binding ColSpan}" />
            <Setter Property="Grid.Column" Value="{Binding ColIndex}" />
        </Style>
    </ItemsControl.ItemContainerStyle>
</ItemsControl>

As my data is Huge(120 rows,110 columns) its taking so much tie to render. So can any one help to improve the performance of my requirement.

mhoward
  • 455
  • 5
  • 12
SivaKumar
  • 11
  • 1
  • 5
  • This looks like a relevant thread that may help you. http://stackoverflow.com/questions/2783845/virtualizing-an-itemscontrol – mhoward May 05 '14 at 06:32
  • Start using a DataGrid instead of a plain ItemsControl. – Jehof May 05 '14 at 06:35
  • Hi Jehof, Thanks for the reply. i am using grid instead of data grid i need rowspan/colspan for my table data. – SivaKumar May 06 '14 at 10:38

0 Answers0