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

Custom field template is not working as expected

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Milan
Top achievements
Rank 1
Milan asked on 11 Apr 2017, 03:57 PM

Hello,

I'm trying to solve problem with rendering objects, I've found a solution using custom template for field.

My code:

$interprets = new \Kendo\UI\GridColumn();
       $interprets
           ->field('interprets')
           ->template('#
           var template = "<ul>";
   for (var i = 0; i < interprets.length; i++) {
       template = template + "<li>" + interprets[i].contact.name+ "</li>";
   }
 
   return template + "</ul>";
#')
           ->title('interprets');

But the result is not what I expected, it can be seen on screenshot attached.

Can you please tell me, how to solve this issue?

Thanks a lot

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 13 Apr 2017, 11:47 AM
Hi Milan,

By default the <li> HTML elements will have a dot placed before them. If you would like to remove it you would need to add the following CSS to the page.

ul {
  list-style-type: none;
}


Regards,
Viktor Tachev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Milan
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or