Radgrid nestedviewtemplate image onerror

2 posts, 0 answers
  1. ITeQ
    ITeQ avatar
    2 posts
    Member since:
    May 2013

    Posted 09 Sep 2015 Link to this post

    Hi,

    For a web application I've created a radgrid solution and used the nestedviewtemplate to display more detailed information about the selected product. 

    In case there is an image not found on the server there is an onerror event that is configured in the img tag. On a regulare page (without an nested radgrid) it works perfectly, only when it's embedded in the nestedview of an radgrid it will give the error 'Problems while loading image' in stead of displaying the onerror image. 

    The project is based on the images that are located on the server instead of the images are stored in the database.

    I've already checked if the onerror image is in the correct place and it is.

     

    Could you please give me some advice on how to fix this?

     

    Code

    <NestedViewTemplate>
      <div style="background-color: rgba(92, 92, 130, 0.2); width: 100%; height:100%; display: inline-block;">
        <ul style="width:770px; font-size:12px;">
          <li style="width: 100%;float: left"> </li>
          <li style="width:250px;float: left">
            <div style="margin-left: 2em">
              <a rel="puArtikel" href="/full/<%#Eval("anummer") %>.jpg" class="jqzoom" title="Artikel - <%#Eval("anummer") %>">
                <img id="imgProductInfo" src="/full/<%#Eval("anummer") %>.jpg" width="225" style="border:1px solid #0a0b32;"
                  onerror="this.src='../images/noimage_80.jpg';"
              </a>
            </div>
          </li>
        </ul>
        <br style="clear: both;" />
      </div>
    </NestedViewTemplate>
  2. Pavlina
    Admin
    Pavlina avatar
    6184 posts

    Posted 12 Sep 2015 Link to this post

    Hello,

    May I ask you to isolate the error in a sample runnable project and send it to us via support ticket. We will check it out and will advice you further.

    Regards,
    Pavlina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top