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

bind the image into Radgridview

2 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 05 Jan 2011, 03:14 PM

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 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 05 Jan 2011, 05:00 PM
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
0
Kiran
Top achievements
Rank 1
answered on 06 Jan 2011, 11:45 AM
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.
Tags
General Discussions
Asked by
Kiran
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Kiran
Top achievements
Rank 1
Share this question
or