performance problem when put RadGridView into ItemsControl

0 Answers 49 Views
GridView
Guang
Top achievements
Rank 1
Iron
Guang asked on 27 Jun 2022, 11:37 PM

My requirement is to place a set of RadGridView horizontally, there's a ScrollViewer and ItemsControl, see code below.

 <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
	<Grid>
		<ItemsControl Name="GridItemsControl" HorizontalAlignment="Left" HorizontalContentAlignment="Left"
					  ItemsSource="{Binding Results}">
			<ItemsControl.ItemsPanel>
				<ItemsPanelTemplate x:Uid="ItemsPanelTemplate_1" x:Name="GridItemPanelTemplate">
					<DockPanel x:Uid="DockPanel_1" />
				</ItemsPanelTemplate>
			</ItemsControl.ItemsPanel>
			<ItemsControl.ItemTemplate>
				<DataTemplate x:Uid="DataTemplate_5">
					<telerik:RadGridView Grid.Row="0"
									 Margin="8"
							 ItemsSource="{Binding Items}" 
							 AutoGenerateColumns="False" 
							 IsReadOnly="True"
							 GroupRenderMode="Flat"
							 ShowGroupPanel="False"
							 CanUserSortColumns="False" 
							 ShowColumnSortIndexes="False"
							 RowIndicatorVisibility="Collapsed" 
							 CanUserGroupColumns="False"
							 SelectionMode="Extended"
							 ClipboardCopyMode="All" >
						<telerik:RadGridView.Columns>
							<telerik:GridViewDataColumn Width="Auto"
														Header="Depth"
												IsFilterable="False"
												ShowToolTipOnTrimmedText="True" 
												TextAlignment="Right"
												DataMemberBinding="{Binding Depth}">
							   
							</telerik:GridViewDataColumn>
						</telerik:RadGridView.Columns>
					</telerik:RadGridView>
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>
	</Grid>
</ScrollViewer>

The UI got stuck while the program was running, but when replace RadGridView by DataGrid, it can run, and if I replace the Grid with ListView, the UI can work, but the function not meet my requirement

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Guang
Top achievements
Rank 1
Iron
Share this question
or