Skip to main content
All docs
V25.1
  • The Click event of asp:ImageButton is not raised when the component is located inside a template

    Error Description

    When ASPxGridView sends a callback, the Click event is no longer fired for asp:ImageButton placed inside the DataItemTemplate.

    Solution

    The asp:ImageButton registers its scripts in the PreRender event handler. The event is raised when the page performs a postback, but not when a callback is sent. Refer to the following topic for more information about callbacks: Callbacks.

    To resolve this issue, you can implement any of the following workarounds:

    • Use the ASPxButton control with a background image (the BackgroundImage-ImageUrl property) instead of asp:ImageButton.
    • Set the EnableCallBacks property to false to disable callbacks and place ASPxGridView inside UpdatePanel.