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

Image Column Performance

2 Answers 157 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Geoffrey
Top achievements
Rank 1
Geoffrey asked on 16 Aug 2012, 02:02 PM
I have noticed a severe performance issue when adding a GridViewImageColumn to my GridView. Scrolling gets very sluggish. I'm using
DataMemberBinding="{Binding ImageUrl}"
and the actual value is ../images/warning.ico. The same happens with other formats like png as well. Any suggestions on improving the performance?

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 17 Aug 2012, 10:51 AM
Hello Geoffrey,

May you share a bit more details on your setup e.g. number of row, average image size , maybe some xaml .

Any info and or code/xaml would be helpful.

Meanwhile I may suggest trying to disable virtualization. This will result in longer initial load , however the heavy part of loading the images will be executed at load rather than while scrolling.

Greetings,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Geoffrey
Top achievements
Rank 1
answered on 17 Aug 2012, 01:36 PM
I think I found why the performance was degraded. Only certain rows will have an image and the rows that didn't have an image seems to be what influenced the performance. So I ended up making a transparent empty png file to use for those rows without an image. It was still slow, so I also changed the column to the following:

<telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Image Source="{Binding ImageUrl}" Height="15"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>

Tags
GridView
Asked by
Geoffrey
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Geoffrey
Top achievements
Rank 1
Share this question
or