Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
First td tag of single column template is deleted
posted

Hello,

I have a grid in responsive mode with a single column template that contain a table.

I use jsRender for the template engine.

During the execute template, i lose the first "<td" and the first "</td>".

This break the HTML of my template.

This replace is done in the _executeTemplate of the infragistics.lob.js :

_executeTemplate: function (data) {
   if (this._jsr) {
      return $.render[ this.grid.id() + "_responsiveSct_" + this._mode ](data)
      .replace("<td", "").replace("</td>", "");
   }
   return $.ig.tmpl(this.options.singleColumnTemplate[ this._mode ], data)
   .replace("<td", "").replace("</td>", "");
}

I reproduce the problem in this example : http://jsfiddle.net/yuz7LwLa/2/

Is there a way to avoid the replace?

Thank.

Yoann

  • 25665
    Verified Answer
    Offline posted

    Hello Yoann,

    Thank you for contacting Infragistics!

    I have done some looking into this matter and you shouldn’t use a table in the template. It will very likely cause you performance issues as for each row it will render an additional table when the grid is already a table. Instead you should use div, span elements and CSS to template how you want it to appear.