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

Using image from web URL

1 Answer 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alon Agmon
Top achievements
Rank 1
Alon Agmon asked on 29 May 2010, 09:30 PM
Hi,
Im trying to add a column that will display an image from the WWW e.g not from the web app itslef

i have created a custom column but it doesn't seem to display anything at all ...

 public override FrameworkElement CreateCellElement(Telerik.Windows.Controls.GridView.GridViewCell cell, object dataItem) 
        { 
             
            var cellImage = new Image() { Width = 50, Height = 50 }; 
            string imageUri = string.Empty; 
            // here i just get a URL 
            Dictionary<String, String> mapData = MainPage._Gfields[this.DataMemberBinding.Path.Path].ValueMap.MapData; 
            if (mapData.ContainsKey((string)cell.Value)) 
                imageUri = mapData[(string)cell.Value]; 
            else 
                imageUri = mapData["*"]; 
            // image URL is like: http://some-remote-URL/sample.gif 
            cellImage.Source = new BitmapImage(new Uri(imageUri, UriKind.Absolute)); 
            return cellImage;  
        }

i always get am empty column ...
any idea what am doing wrong ..

Alon


1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 31 May 2010, 07:28 AM
Hi Alon,

Displaying gif images in Silverlight is not supported in general.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Alon Agmon
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or