how to set image in GridViewImageColumn

1 posts, 0 answers
  1. raghw
    raghw avatar
    2 posts
    Member since:
    Jul 2012

    Posted 05 Jun 2012 Link to this post

    Hello every one,

    how to set image in GridViewImageColumn if my image url is absolute(e.g. https://dev.dash-online.net/NGS-SandBox/Module/Logo/a.png)
       <telerik:RadGridView Grid.Column="1"  Grid.Row="1" ItemsSource="{Binding LogoCallection}" AutoGenerateColumns="False"
                                ColumnWidth="*"  CanUserFreezeColumns="False"
    >
                <telerik:RadGridView.Columns>
     
                    <telerik:GridViewImageColumn Header="Photo"  DataMemberBinding="{Binding Path=ImageURL}"
                                     ImageHeight="35" ImageWidth="35" Width="45" ErrorImageSource="1335437193_dialog-close.png" HeaderTextAlignment="Center" />
                    <telerik:GridViewImageColumn Header="test" DataMemberBinding="{Binding Name1, Converter={StaticResource StringToURLConverter}}" ImageHeight="40" ImageWidth="40" />
                    <telerik:GridViewDataColumn Header="Default"
                                         DataMemberBinding="{Binding Default}"
     
                                         IsFilterable="False"/>
                    <telerik:GridViewDataColumn Header="Name"
                                                    DataMemberBinding="{Binding Name}"
                                         DataFormatString="{}{0:yyyy}"/>
                
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>

    wcf Service code(Method)
    public IList<spSelectLogoResult> GetAllLogoCollection(long FranchiseeId,
                long LocationId)
            {
                using (DLLDataClassesDataContext dll = new DLLDataClassesDataContext())
                {
                    var resultDetails = (from t in dll.spSelectLogo(null, FranchiseeId, LocationId)
                                         select new spSelectLogoResult
                                         {
                                             Name = string.Concat("https://dev.dash-online.net/NGS-SandBox/Module/Logo/", t.Name),
                                             Default = t.Default,
                                             ImageURL = new Uri(string.Concat("https://dev.dash-online.net/NGS-SandBox/Module/Logo/", t.Name))
                                         }
                ).ToList();
     
                    return resultDetails;
     
                }
            }

    please help any one.
    thanks.

    Raghwendra
      
Back to Top