This is a migrated thread and some comments may be shown as answers.

Radgrid nestedviewtemplate image onerror

1 Answer 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ITeQ
Top achievements
Rank 1
ITeQ asked on 09 Sep 2015, 12:06 PM

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>

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Sep 2015, 04:45 PM
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
Tags
Grid
Asked by
ITeQ
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or