sfDataGrid1 Bind a Tableau Adding text and images, it was found to be blank.
is . demo
Attachment: WindowsFormsApp6_e179361c.7z
Hi yu ma,
Currently, the SfDataGrid does not support loading images as the Image type. To load an image into the cell of the GridImageColumn, you need to convert the image to a Byte[] array type. Please find the code snippet and the user guide documentation below for the details of the implementation.
Code Snippet:
public byte[] ImageToByteArray(System.Drawing.Image imageIn) { MemoryStream ms = new MemoryStream(); imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); return ms.ToArray(); } |
Loading images:
var image1 = Image.FromFile(@"..\..\Images\Demo1.jpg"); var image2 = Image.FromFile(@"..\..\Images\Demo2.jpg"); var imageBitArray1 = ImageToByteArray(image1); var imageBitArray2 = ImageToByteArray(image2); dt.Rows.Add("demo1", imageBitArray1); dt.Rows.Add("demo2", imageBitArray2); |
UG Link:Column types in WinForms DataGrid control | Syncfusion
We have prepared a sample to address your requirement. Please find it in the attachment.
We have analyzed and considered this as the requirement “Provide support for Loading Images as Image Type in GridImageColumn of SfDataGrid” and logged feature request for the same. We will implement this feature in any of our upcoming release.
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.
We will provide the feedback for the feature request by tomorrow.
We appreciate your patience until then.
Regards,
Sreemon Premkumar M.
Attachment: WinForms_SfDataGrid_c85a358b.zip
hi Sreemon Premkumar Muthukrishnan
I know how to insert images into arrays, but in terms of convenience, images are more convenient
thank
Hi yu ma,
Thanks for the update, but currently, the SfDataGrid does not support loading images as the Image type. We have analyzed and considered this as the requirement “Support to load images as Image Type in GridImageColumn of DataGrid” and logged feature request for the same. We will implement this feature in any of our upcoming release.
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.
Feedback link: Support to load images as Image Type in GridImageColumn of DataGrid in WinForms | Feedback Portal (syncfusion.com)
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.
Regards,
Sreemon Premkumar M.
- 3 Replies
- 2 Participants
-
YM yu ma
- Oct 9, 2024 07:55 AM UTC
- Oct 11, 2024 05:39 PM UTC