This question is locked. New answers and comments are not allowed.
The Question i would like to post to them is the following. To whom this
may concern,, I am using the telerik raddatagrid with the following
<telerikGrid:RadDataGrid.GroupHeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Group.Key, Converter={StaticResource GroupKeyToStringConverter}}" VerticalAlignment="Center" FontSize="18" FontWeight="Bold"/>
</DataTemplate>
</telerikGrid:RadDataGrid.GroupHeaderTemplate>
<telerikGrid:RadDataGrid.Commands>
<controls:GroupHeaderTapHackCommand/>
</telerikGrid:RadDataGrid.Commands>
</telerikGrid:RadDataGrid>
The issue is that when the user clicks on a grouped header that is greater than one and if the row has some image in it. It produces a glitch for any random image and turns it into a white box. I am starting to believe when the focus is given to another control it temporarily disappears. Why would the images in the row be rendered differently when the grouped header is collapsed and then is expanded here is the temporary workaround but if the user double taps then it does not work.
public class GroupHeaderTapHackCommand : DataGridCommand
{
public GroupHeaderTapHackCommand()
{
Id = CommandId.GroupHeaderTap;
}
public override bool CanExecute(object parameter)
{
return true;
}
public override void Execute(object parameter)
{
var dataView = Owner.GetDataView();
var context = parameter as GroupHeaderContext;
if (context.IsExpanded)
{
dataView.CollapseGroup(context.Group);
}
if (!context.IsExpanded)
{
dataView.ExpandGroup(context.Group);
}
Owner.Focus(Windows.UI.Xaml.FocusState.Programmatic);
}
}
<DataTemplate>
<TextBlock Text="{Binding Group.Key, Converter={StaticResource GroupKeyToStringConverter}}" VerticalAlignment="Center" FontSize="18" FontWeight="Bold"/>
</DataTemplate>
</telerikGrid:RadDataGrid.GroupHeaderTemplate>
<telerikGrid:RadDataGrid.Commands>
<controls:GroupHeaderTapHackCommand/>
</telerikGrid:RadDataGrid.Commands>
</telerikGrid:RadDataGrid>
The issue is that when the user clicks on a grouped header that is greater than one and if the row has some image in it. It produces a glitch for any random image and turns it into a white box. I am starting to believe when the focus is given to another control it temporarily disappears. Why would the images in the row be rendered differently when the grouped header is collapsed and then is expanded here is the temporary workaround but if the user double taps then it does not work.
public class GroupHeaderTapHackCommand : DataGridCommand
{
public GroupHeaderTapHackCommand()
{
Id = CommandId.GroupHeaderTap;
}
public override bool CanExecute(object parameter)
{
return true;
}
public override void Execute(object parameter)
{
var dataView = Owner.GetDataView();
var context = parameter as GroupHeaderContext;
if (context.IsExpanded)
{
dataView.CollapseGroup(context.Group);
}
if (!context.IsExpanded)
{
dataView.ExpandGroup(context.Group);
}
Owner.Focus(Windows.UI.Xaml.FocusState.Programmatic);
}
}