This is a migrated thread and some comments may be shown as answers.

[Solved] Problems with images in Grid

1 Answer 82 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yuri
Top achievements
Rank 1
Yuri asked on 10 Jul 2013, 01:25 PM
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);
    }
}

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 11 Jul 2013, 12:17 PM
Hi Yuri,

I can see that currently you are using the 2013_2_611 version of our controls. I can suggest you download our latest 2013.2.625.0 version as it includes several fixes(including for the DataGridImageColumn) and see if this issue still exist. You can access it through your account -- Products & Subscriptions -- RadControls for Windows 8 -- Installer and other resources -- RadControls for Windows 8 XAML -- Browse all product files -- choose the option that suits you the most.
If this does not solve the problem, could you please take a look at the attached project and try to modify it, in order to reproduce this bug?

I am looking forward to your reply.

 

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Grid for XAML
Asked by
Yuri
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or