Can a cell in ui-grid be rendered with a custom template? - ng-grid

Disclaimer: I'm new to UI-Grid
According to the ui-grid documentation, it is possible to style a cell by providing a class.
But is it possible to choose a template for a given cell? I'd like to do more than style just the class.

Yes, you can use cellTemplate
This is default cell template
cellTemplate: '<div class="ui-grid-cell-contents">{{COL_FIELD CUSTOM_FILTERS}}</div>'
Here is Plunker

Related

Does Kendo UI have a simple list component?

I am looking for a simple list component, similar to the HTML listbox (or Bootstrap "List group".)
Does such a component exist?
If not which component can be used for this purpose?
Thanks
ListView is Kendo's version of simple list. In demos on Telerik site, almost every listView has template with image. But simple listView looks as you want. I just add padding, to make it more readable:
Example: http://dojo.telerik.com/AyIwU/2
EDIT: Example with max-height and scroll: http://dojo.telerik.com/AyIwU/6

How do I assign a data-attribute to each <td> element in a kendo grid?

Since kendo doesn't have cell-templating per se, I've decided to add a data attribute to each cell inside a kendo grid.
I need a "data-column" attribute to each element inside a kendo grid, so that each of them can be uniquely identified with columns.field name.
Is there an out of the box way to go about doing this?
I found a solution and it's out-of-the-box. Use columns.attributes object to set DOM attributes to each TD.

Footer template in kendo combobox

Does kendo have any option to set FOOTER template like header ?
My requirement is to show some content in Footer, say that "Type more for refine search"
The Kendo Combobox does not support footers.
http://www.telerik.com/forums/footer-template-in-combobox
The ComboBox widget does not support footerTemplate. As an alternative
solution I suggest putting the checkbox outside of the widget and use
the setOptions method to modify the filter that is used by the widget.
For example:

How to add a image to dojo datagrid cell

I can add a image to dojo datagrid cell by adding a class to the cell,but when I double click the cell the images of row that I clicked are lost,so is there a another way to add a image that not being lost.
yes there is,
simply add an
<div class="imagediv"></div>
as the value of your cell and also in your css file, something like that:
.imagediv{height:20px;width:20px;background-image:url(/path/to/image.png);}
if you need to display an image based on cell values, you should look into the dojo's layout-formatter functions:
http://dojotoolkit.org/reference-guide/1.8/dojox/grid/DataGrid.html
(search for formatter)

Add stylesheetclass to telerik dropdown

I want to add a CSS class to telerik dropdown. Here is my View Code:
#Html.Telerik().DropDownList().Name("ddlSalutationMailing").Items((ddlItem => { ddlItem.Add().Text(" - Select One - "); }))
Purpose:
I have many Telerik dropdownlists in my project, So I would like to set width commonly for all dropdownlists.
Thanks in advance
If Telerik doesn't have a method allowing you to set attributes on the dropdownlist, what I commonly do is look at the underlying HTML, find the CSS classes that Telerik uses to represent the dropdownlist, and override the width values with the values you want. That's worked well for me for what you are describing.

Resources