Skip to content

Replies

0
Maxime DRIVET
Maxime DRIVET answered on Jan 14, 2014 3:33 PM

This is my workaround :

– First, remove the FormatterFunction for desired column.

– Add a class in RowTemplate like : "<td class=\"applyMultilineFormater\">${MyColumnValue}</td>"

– Then, add a delegate to intercept the 'dataRendered' event.


$(document).delegate("#myMasterGridName", "iggriddatarendered", function (evt, ui) {
$('.applyMultilineFormater').each(function () {
$(this).html(MultilineFormater($(this).html()));
});
});

function MultilineFormater(val) {
return val.replace(/\n/g, "<br/>");
}

And it works !

Feel free to correct/update my code.

Thanks.

0
Maxime DRIVET
Maxime DRIVET answered on Jan 14, 2014 12:23 PM

Hello,

I have exactly the same problem. My grid displays "<br/>" instead of a real line break.

And this is due to my RowTemplate: If I remove it, the formatter works.

Can you help me ?

Regards,

Maxime DRIVET.