We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem showing photo in the grid

Thread ID:

Created:

Updated:

Platform:

Replies:

130355 May 8,2017 05:12 PM UTC May 9,2017 05:27 PM UTC Xamarin.iOS 1
loading
Tags: SfDataGrid
Vitor Santos
Asked On May 8, 2017 05:12 PM UTC

Hello, I have an employee datable that i would like to show in a data grid. one of the fields in the datable is a photo field that contains the employees' photo. 
My problem is that this photo column in the grid  shows only "System.Byte[]".

I guess i shall somehow format the column in the GridAutoGeneratingColumns event but i'm not reaching there... 
I'm using xamarin,ios in visual studio (Mac) and c#, and would appreciate any help... thanks






Sivaraman Sivagurunathan [Syncfusion]
Replied On May 9, 2017 05:27 PM UTC

Hi Vitor, 
 
Thanks for contacting Syncfusion Support. 
 
We have checked your query and prepared sample for your reference. If your using older version of SfDataGrid you can use the Template Column for loading image to in SfDataGrid using UserCellType Property else Update the SfDataGrid latest (version 15.2.0.40)  then you can use the GridImageColumn to load the image to the SfDataGrid. 
 
The below code example illustrate  how to load the image in SfDataGrid using UserCellType property. 
 
 
GridTextColumn customerImageColumn = new GridTextColumn(); 
customerImageColumn.UserCellType = typeof(GridImageCell); 
customerImageColumn.MappingName = "CustomerImage"; 
customerImageColumn.HeaderText = "Image"; 
 
 
 
The below code example illustrate how to load the image in SfDataGrid using GridImageColum.  
 
 
GridImageColumn customerImageColumn = new GridImageColumn(); 
customerImageColumn.MappingName = "CustomerImage"; 
customerImageColumn.HeaderText = "Image"; 
 
 
 
Please find the sample from below link: 
 
 
 
Regards, 
 
Sivaraman 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;