Imagebound problem

3 posts, 0 answers
  1. zeshan
    zeshan avatar
    8 posts
    Member since:
    Sep 2008

    Posted 17 Sep 2008 Link to this post


    I have image template item in grid,
    and i am showing images in it. this grid is in a popup.

     <telerik:GridTemplateColumn UniqueName="imgPicture">
                                                 <asp:Image ID="Picture" runat="server" Height="100px" ImageAlign="Middle" Width="150px" />
                                             <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                             <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50%" />

    i have an image button to swap this image with another image in grid.
    and i am showing another popup on swap image button click. The user select the image and click on save button.

    The problem is that when I click on the "save button" on the popup then my previous popup grid rebinds and both of the events fires "NeedDataSource" and
    in itemdatabound i am giving the imageurl.

    i have checked that image url is also correct and new image replaced on the old image but my grid shows old image.

    what can be the problem.

    Please guide me. its urgent


  2. Prangadj
    Prangadj avatar
    174 posts
    Member since:
    Jan 2008

    Posted 22 Sep 2008 Link to this post

    What you said seems correct and the image should be replaced with new one if the image url is changed on ItemDataBound when rebinding grid. You can also make it work with ajax - check out this example about edit with popup.

  3. DevCraft R3 2016 release webinar banner
  4. zeshan
    zeshan avatar
    8 posts
    Member since:
    Sep 2008

    Posted 29 Sep 2008 Link to this post


    The problem was that when i was replacing the image then i was giving the same url in itemdatabound. When i change the URL then image has been replaced.

    Means if the url will be same for old and new image then old image will be visible.

Back to Top