bind the image into Radgridview

3 posts, 0 answers
  1. Kiran
    Kiran avatar
    19 posts
    Member since:
    Dec 2010

    Posted 05 Jan 2011 Link to this post

    Hi,
     
    I am using to bind the image into radgridview using sql server 2008. here i am giving the class name is ImagesInfo.cs. When I run the application i am getting some errors showing on the screen. and here i attached the screen shot errors



      public List<ImagesInfo>GetImagesListView(DataSet ds)
            {
                List<ImagesInfo> GetImagesList = new List<ImagesInfo>();
                //byte[] a = new byte[1];
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                  
                    ImagesInfo Objimage = new ImagesInfo();

                    //Objimage.Photo = Convert.ToSByte(dr["Photo"]);
                    Objimage.Photo = dr["Photo"].ToString();
                    GetImagesList.Add(Objimage);
                }
                return GetImagesList;
               
            }

    i think the issue is simple but i am not able to find the solution, please see my problem.

    Thanks With Best Regards
    Patro

  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 05 Jan 2011 Link to this post

    Hi Kiran,

     
    It seems that these images could not be displayed in RadGridView by some reason. Unfortunately using the code snippet you provided we are not able to reproduce the issue. Can you please send us a small application via support ticket which we can debug it locally? Also I would recommend you to use the following blog post "Displaying images stored in MS SQL with RadGridView for Silverlight".

    Best wishes,
    Vanya Pavlova
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Kiran
    Kiran avatar
    19 posts
    Member since:
    Dec 2010

    Posted 06 Jan 2011 Link to this post

    Hi,

    I used the link which u send the blog post, but i am unable to find the exact solution. But in sqlserver we declare the image for varbinary datatype.
    So is there any solution to convert the varbinary to image at codebehind . I have to bind the image into radgridview which is varbinary data type at back end and to display the image at front end.
    So please kindly give any suggestion or sample of the code

    thanks & regards

    Kiran.
Back to Top