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

Image in grid row WITHOUT row template

1 Answer 162 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 17 Jan 2012, 11:29 PM
I'm trying to add an image to a row in a grid without using a row template. You can see how I'm trying to do this below:
columns: [{
            field: "Title",
            title: "Title",
            format: "<img src='/Images/${ SKU }_small.jpg' alt='${ Title }' />"
        }, {
            field: "OFLC",
            title: "Rating",
            width: 55
        }, {
            field: "Price",
            title: "Price",
            template: "$${ Price }"
        }]

The result is this:
<img src='/Images/${ SKU }_small.jpg' alt='${ Title }' />
showing up instead of the image...

Is it possible to acheive without a row template?

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 18 Jan 2012, 09:46 AM
Hello Gabriel,

You can use column template instead of row template. Simply replace format property with template( as in the last column definition).

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or