Excluding Button image button from ajax post back

2 posts, 0 answers
  1. EmpowerIT
    EmpowerIT avatar
    117 posts
    Member since:
    Jun 2007

    Posted 28 Oct 2010 Link to this post

    I've read the previous threads on this topic but I still cannot seem to get it working consistently.
    I have a radgrid that contains an Image button column. I am registering the button in this column as a post back control in the ItemCreated event of the grid. When the page first loads and I click on this button it works as expected, by doing a full postback. The problem only occurs if any other ajax update is applied to the grid, such as selecting a different page off the grid. The next time i click on the 'post back' button in the column, it will postback via ajax.

    Here is my code:

    void SearchResults_ItemCreated(object sender, GridItemEventArgs e)
            if(e.Item is GridDataItem)
                GridDataItem item = e.Item as GridDataItem;
                ImageButton publishedImgButton = item["PublishButton"].Controls[0] as ImageButton;
                if (publishedImgButton != null)

    This is the column definition in the rad grid:
    <telerik:GridButtonColumn ItemStyle-HorizontalAlign="Center" HeaderText="Download PDF file" UniqueName="PublishButton" CommandName="GetPublished" ButtonType="ImageButton" ImageUrl="../../Images/Buttons/Small/document_down.png">
          <ItemStyle HorizontalAlign="Center"></ItemStyle>

    Thanks for your help
  2. Pavlina
    Pavlina avatar
    6069 posts

    Posted 29 Oct 2010 Link to this post


    Please examine the following link and see if it helps to disable AJAX for the image button:
    Exclude controls from ajaxifying

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top