Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi there, I have a XPObject tha contain an image:

                                     private Image photo;
                                            [DevExpress.Xpo.ValueConverter(typeof(DevExpress.Xpo.Metadata.ImageValueConverter))]
                                            public Image Photo
                                            {
                                                get { return photo; }
                                                set { SetPropertyValue<Image>("Photo", ref photo, value); }
                                            }

                                    Is it possible to load it during edit mode and how? If now how can I add the photo to my object?

                                    I added this column to present it:

                                    s.Columns.Add(settings =>
                                            {
                                                settings.Name = "Photo";
                                                settings.FieldName = "Photo";
                                                settings.Caption = "Photo";
                                                settings.ColumnType = MVCxGridViewColumnType.BinaryImage;
                                                BinaryImageEditProperties properties = (BinaryImageEditProperties)settings.PropertiesEdit;
                                                properties.ImageHeight = 180;
                                                properties.ImageWidth = 200;
                                            });

                                    Is this correct?

                                    Thanks

                                0

                                Hello Aristidis,

                                Thank you for contacting us. GridView's BinaryImage column operates with binary data. Thus it is necessary to bind the "Photo" column with the "byte[]" field in the following manner:

                                [C#]
                                private byte[] photo; public byte[] Photo { get { return photo; } set { SetPropertyValue<byte[]>("Photo", ref photo, value); } }

                                Please let me know if this helps.

                                Regards,
                                Mike

                                P.S. It seems you are using an older build of our components (according to the report's Build field). Please visit our Version Info Page to learn about the most recent versions of our products, and obtain instructions on how to update them.

                                0

                                ok so I'll change that,

                                So when I Have an image or binImage column in grid view, on new or edit, how do I load an image?
                                Is there some way implemented in the control settings?

                                0

                                Hello Aristis:

                                We have an example for the ASPxGridView control that illustrates how to load an image.
                                I assume that you can utilize the same scenario in MVC:

                                Image Upload in ASPxGridView

                                Thanks
                                Kate.

                                0

                                Thanks a lot, I'll try that!

                                0

                                Hi again,

                                I tryed to combine the example you mentioned and the MVC File Upload - AJAX Uploading Demo but I couldn't figure out how to do it.

                                So I am send ing you sample project (part of my original project) and kindly ask you to give some mode specific instructions on the case.

                                To Help you understand, I have a grid showing student details (served by the StudentController. I am using Inline editing. So I have added a column to the grid view and render a partial with the upload control in the SetEditItemTemplateContent method. that works so far but I cand figure out what do do next with the selected file.

                                If you could check It out and give some instructions I would be a wonder.

                                Thanks in advance

                                0

                                Hello Aristis,

                                We appreciate your patience while we are working on finding a solution to your inquiry. We will inform you as soon as any results are available.

                                Regards,
                                Mike

                                0

                                Hello Aristidis,

                                To utilize the UploadControl Extension you need to place it in a page form. Please see the View code in the File Upload - AJAX Uploading demo for an example.

                                Let us know if you need any additional assistance.

                                Best regards,
                                Vladimir

                                0

                                Thanks Vladimir,

                                I didn't notice that I had to wrap it in a form. Now it works fine.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners