Ticket T433500
Visible to All Users

ASPxGridView - How to upload an image in the edit form

created 9 years ago

Hi,
i  need to upload a description and image upload inside aspxGridView.
I found this article, but i see that's very oldest version and it's obsolete…
https://www.devexpress.com/Support/Center/Example/Details/E95

you can provide me an example for my new version in c#?

Thank you.

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hello,

In the latest version, 16.1, you can use the ASPxGridView built-in functionality to accomplish this task. Add a GridViewDataBinaryImageColumn to the grid and set its GridViewDataBinaryImageColumn.PropertiesBinaryImage.EditingSettings.Enabled property to True to activate this feature. In this case, an upload control is shown in the edit form automatically as an editor for this column. Please refer to the ASP.NET Data Grid - Binary Image Editor (Coming soon in v15.1) blog post and the Binary Image Column Editing demo for more information.
Let us know if this approach meets your requirements.

    Show previous comments (7)
    RV RV
    Raffaele Vitiello 1 8 years ago

      Nothing to do…
      not work.

      this is the actual state:

      XML
      <httpHandlers> <add verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" validate="false" type="DevExpress.Web.ASPxUploadProgressHttpHandler, DevExpress.Web.v15.2, Version=15.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"/> <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v15.2, Version=15.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET" path="DX.ashx" validate="false"/> </httpHandlers>

      I'm trying to create a new simple c# project and include my grid into it…and work fine…
      i don't understand where is the problem.

      RV RV
      Raffaele Vitiello 1 8 years ago

        The problem is the same …

        Don't found this file: ASPxUploadProgressHandlerPage.ashx

        But this is a phisical file?

        Lanette (DevExpress Support) 8 years ago

          Hello,

          I suggest you also use the recommendations from the ASPxUploadControl / MVC UploadControl - FAQ article (see the "7. Why may the "Not Found" error message appear?" paragraph) and the MVC UploadControl stopped working after upgrading to version 11.4 ticket and add an exception for the standard route to the RegisterRoutes method in the global.asax file.

          C#
          protected void Application_Start() { ... RegisterRoutes(RouteTable.Routes); } public static void RegisterRoutes(RouteCollection routes) { routes.Ignore("{resource}.ashx/{*pathInfo}"); ... }

          In addition, I recommend you check if the ASPxUploadProgressHandler is available by navigating to the following page in your application: http://localhost:49978/ASPxUploadProgressHandlerPage.ashx. Ensure that an empty xml is returned on this page and the corresponding request has status 200.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.