Hi Telerik,
i got a GridView with a ImageColumn
within the cellFormatting event I do the following:
if (e.CellElement.ColumnInfo is GridViewImageColumn)
{
if (e.CellElement.Image == null)
{
if (((GridViewImageColumn)e.CellElement.ColumnInfo).FieldName == "PicturePath")
{
string strPath = ((GridImageCellElement)e.CellElement).Value.ToString();
if (strPath != string.Empty)
{
e.CellElement.Image = new Bitmap(strPath);
e.CellElement.ImageLayout = ImageLayout.Stretch;
}
}
this works fine basically, but when I get to a certain number of records it gets considerably slow when scrolling (because it has to repaint the grid again....)
I also noticed, when scrolling forward and backwards it randomly places displayed images within the column (even to record who actually dont have an image yet)
Any idea how to improve the performance and how to get around the scrolling issue?
thank you
cheers
Christian
i got a GridView with a ImageColumn
within the cellFormatting event I do the following:
if (e.CellElement.ColumnInfo is GridViewImageColumn)
{
if (e.CellElement.Image == null)
{
if (((GridViewImageColumn)e.CellElement.ColumnInfo).FieldName == "PicturePath")
{
string strPath = ((GridImageCellElement)e.CellElement).Value.ToString();
if (strPath != string.Empty)
{
e.CellElement.Image = new Bitmap(strPath);
e.CellElement.ImageLayout = ImageLayout.Stretch;
}
}
this works fine basically, but when I get to a certain number of records it gets considerably slow when scrolling (because it has to repaint the grid again....)
I also noticed, when scrolling forward and backwards it randomly places displayed images within the column (even to record who actually dont have an image yet)
Any idea how to improve the performance and how to get around the scrolling issue?
thank you
cheers
Christian