Hi,
I have a grid with several levels... and I put it in a UserControl.
The root control is a frame that allow to navigate from/to several usercontrols...
When I navigate to the control that contains the grid, I only see the Header of the grid... not the records !
If I move the scrollbar, it is refreshed ! so, it sounds that there is a refresh problem
How can I force a repaint of the records (Like I do by scrolling)?
Thanks
Same issue here when navigating back to the frame that contains my grid (everything else is properly refreshed). Moving the scrollbar or resizing the window triggers a refresh of the grid...
http://es.infragistics.com/gethelp (scroll down to 'Request Developer Support Online')
Joe Modica
Hi Joe,
Yes I have try this too !
I can provide you a non-obfuscated version of the .exe with instructions...
Here is how I navigate :
List<Page> pages = ...
navigationFrame.Navigate(currentPage);
Here is the code initialization in the page:
xdgGenres.DataSource = MediaKernel.CurrentMediaDeviceFeature.Medias;
Here is the XAML code :
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igWindows="http://infragistics.com/Windows" xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:igEditors="http://infragistics.com/Editors" xmlns:mediadata="clr-namespace:ViewOn.Kernel.Media" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="ViewOn.UI.View.RadioPart" Title="WebViewPage" IsEnabled="True" Focusable="False"> <Page.Resources> <!-- Context menu --> <ContextMenu x:Key="RadioPartContextMenu"> <MenuItem Header="Play" Click="contextMenuPlay_Click"/> </ContextMenu> <ContextMenu x:Key="RadioPartContextMenuExtended"> <MenuItem Header="Play" Click="contextMenuPlay_Click"/> <MenuItem Header="Remove" Click="contextMenuRemove_Click"/> <MenuItem Header="Edit" Click="contextMenuEdit_Click"/> </ContextMenu> <!-- Link style --> <Style x:Key="CellValuePresenter_LinkStyle" TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Cursor="Hand" Foreground="{DynamicResource VOColor03}" TextDecorations="Underline" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Record.DataItem.SiteUrl}"> </TextBlock> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- The radio level must be translated to the right --> <Style TargetType="{x:Type igDP:ExpandableFieldRecordPresenter}"> <Setter Property="Padding" Value="30,0,0,0" /> </Style> <!-- The "+" "-" to group sub levels --> <Style TargetType="{x:Type igWindows:ExpansionIndicator}"> <Setter Property="Margin" Value="5,0,5,0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igWindows:ExpansionIndicator}"> <Grid Width="12" Height="12" x:Name="grdExpansionIndicatorClosed" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="True"> <Path x:Name="ExpandPath" StrokeThickness="1" Stroke="#00CCCCCC" Fill="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Width="7" Height="10" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Data="M60,40 L60,20 70,30 z" Cursor="{TemplateBinding Cursor}"> <Path.RenderTransform> <TransformGroup> <RotateTransform Angle="0" /> </TransformGroup> </Path.RenderTransform> </Path> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="ExpandPath" Property="RenderTransform"> <Setter.Value> <TransformGroup> <RotateTransform Angle="90" /> </TransformGroup> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Remove the horizontal scrollbar --> <Style TargetType="{x:Type igDP:RecordListControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:RecordListControl}"> <ScrollViewer CanContentScroll="True" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"> <ItemsPresenter/> </ScrollViewer> </ControlTemplate> </Setter.Value> </Setter> </Style> </Page.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="30"/> <RowDefinition /> </Grid.RowDefinitions> <DockPanel Background="#FF3F3C3B"> <StackPanel Orientation="Horizontal" Height="30"> <Button x:Name="btnAddRadio" Margin="5,2,5,2" Style="{DynamicResource ButtonTransparentWithEffect2}"> <StackPanel Orientation="Horizontal"> <Image Source="/_images/PartRadio/add.png" Width="18" Height="18"/> <TextBlock Text="Add" Margin="5,0,5,0" VerticalAlignment="Center"/> </StackPanel> </Button> <Button x:Name="btnRemoveRadio" Margin="5,2,5,2" Grid.Column="1" Style="{DynamicResource ButtonTransparentWithEffect2}"> <StackPanel Orientation="Horizontal"> <Image Source="/_images/PartRadio/remove.png" Width="18" Height="18"/> <TextBlock Text="Remove" Margin="5,0,5,0" VerticalAlignment="Center"/> </StackPanel> </Button> <Button x:Name="btnEditRadio" Margin="5,2,5,2" Grid.Column="1" Style="{DynamicResource ButtonTransparentWithEffect2}"> <StackPanel Orientation="Horizontal"> <Image Source="/_images/PartRadio/edit.png" Width="18" Height="18"/> <TextBlock Text="Edit ..." Margin="5,0,5,0" VerticalAlignment="Center"/> </StackPanel> </Button> </StackPanel> <Grid> <TextBlock x:Name="txtCannotConnect" Text="Cannot connect to this radio channel" Foreground="#FFC10000" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Visibility="Hidden" Margin="0,0,15,0"/> <Rectangle x:Name="recProcessing" RadiusX="2" RadiusY="2" ClipToBounds="True" Width="100" Height="10" Visibility="Hidden" HorizontalAlignment="Right" Margin="0,0,15,0"> <Rectangle.Fill> <DrawingBrush TileMode="Tile" Stretch="None" Viewbox="0,0,1,1" Viewport="0,0,25,25" ViewportUnits="Absolute"> <DrawingBrush.RelativeTransform> <TranslateTransform X="0" Y="0" /> </DrawingBrush.RelativeTransform> <DrawingBrush.Drawing> <GeometryDrawing Geometry="M10,0 25,0 15,25 0,25 Z"> <GeometryDrawing.Brush> <LinearGradientBrush StartPoint="4.88101e-008,0.5" EndPoint="1,0.5"> <GradientStop Color="#FF555555" Offset="0"/> <GradientStop Color="#FF555555" Offset="1"/> </LinearGradientBrush> </GeometryDrawing.Brush> </GeometryDrawing> </DrawingBrush.Drawing> </DrawingBrush> </Rectangle.Fill> <Rectangle.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="(Shape.Fill).(Brush.RelativeTransform).(TranslateTransform.X)" From="0" To=".25" RepeatBehavior="Forever" Duration="0:0:1" /> </Storyboard> </BeginStoryboard> </EventTrigger> </Rectangle.Triggers> </Rectangle> </Grid> <!-- Tool bar --> </DockPanel> <igDP:XamDataGrid x:Name="xdgGenres" Grid.Row="1" Background="#FF3F3C3B" IsGroupByAreaExpanded="False" IsNestedDataDisplayEnabled="True" GroupByAreaLocation="None" ScrollingMode="Immediate" ScrollViewer.HorizontalScrollBarVisibility="Hidden"> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout Key="RadioGenre"> <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings HighlightAlternateRecords="True" SelectionTypeRecord="Single" SelectionTypeField="None" SelectionTypeCell="None" AutoGenerateFields="False" AllowDelete="False"/> </igDP:FieldLayout.Settings> <igDP:FieldLayout.Fields> <igDP:Field Name="Title" Label="Title"> <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelWidth="3000" CellWidth="3000"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Radios"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> <igDP:FieldLayout Key="Radio"> <igDP:FieldLayout.SortedFields> <igDP:FieldSortDescription FieldName="Priority"/> </igDP:FieldLayout.SortedFields> <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings LabelLocation="Hidden" HighlightAlternateRecords="True" SelectionTypeRecord="Single" SelectionTypeField="None" SelectionTypeCell="None" AutoGenerateFields="False" AllowDelete="False"/> </igDP:FieldLayout.Settings> <igDP:FieldLayout.Fields> <igDP:Field Name="Priority" Label="Priority" Visibility="Collapsed" > <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelWidth="300" CellWidth="300"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="RadioIcon" Label=""> <igDP:Field.Settings> <igDP:FieldSettings CellMinWidth="20" CellMaxWidth="20" CellWidth="20" CellValuePresenterStyle="{StaticResource BindImageCellValuePresenter}" CellClickAction="SelectRecord" AllowResize="False" LabelWidth="20" LabelMaxWidth="20" LabelMinWidth="20"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Title" Label="Title"> <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelWidth="300" CellWidth="300"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="BitRate" Label="Bit Rate"> <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelMinWidth="50" CellMinWidth="50"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="SiteUrl" Label="SiteUrl"> <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelMinWidth="150" CellMinWidth="150" CellValuePresenterStyle="{StaticResource CellValuePresenter_LinkStyle}"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Description" Label="Description"> <igDP:Field.Settings> <igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" LabelMinWidth="3000" CellMinWidth="3000"/> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid> </Grid></Page>