I have a page in my wpf app where I have multiple devexpress grids rendered (Grid1, Grid2, Grid3 etc) via an items control and would like to make sure that their columns (Column1, Column2, Column3) are rendered the same width initially. For example: Column1 has always the same width in Grid1, Grid2 and Grid3 and Column2 has always the same width in Grid1, Grid2 and Grid3 regardless of what data they are showing.
How can I achieve this?
<ItemsControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
x:Name="Grids" Margin="-5,0,0,0"
ItemsSource="{Binding Items, Mode=TwoWay}"
Background="Transparent"
BorderThickness="0"
Grid.IsSharedSizeScope="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1" BorderBrush="Black" Margin="10,5,0,25" Width="Auto" MinWidth="750">
<dxg:GridControl MaxHeight="250" MinHeight="100" MinWidth="700"
ItemsSource="{Binding Statuses}"
AutoGenerateColumns="None" SelectionMode="None">
<dxg:GridControl.Columns>
<dxg:GridColumn Header="Column1" FieldName="Field1" UnboundType="Object" SortIndex="0" AllowSorting="True" ReadOnly="True" />
<dxg:GridColumn Header="Column2" FieldName="Field2" UnboundType="Object" ReadOnly="True" SortIndex="1" SortMode="Value" Binding="Field2" />
</dxg:GridControl.Columns>
</dxg:GridControl>
<!-- Code left out for brewity sake... -->
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>