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

Treeview dataImageUrlField Templating?

1 Answer 49 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Paul Seabury
Top achievements
Rank 1
Paul Seabury asked on 26 Nov 2012, 04:12 PM
Is there a way to specify a template for the dataImageUrlField?  For instance, the webservice that generates my DTO is not application specific, so it may generate an object with just "IMAGE_UID_SPECIFIER" in the dataImageUrlField.  Once an app is deployed however, I may want to map this to http://tempuri.com/imagewebservice/IMAGE_UID_SPECIFIER.  In this case I'd want my template to be something like 

dataImageUrlField: http://mytemplateurl/imagewebservice/IMAGE_UID_SPECIFIER

{
  "name": "object1",
  "image": "IMAGE_UID_SPECIFIER"
}


$("#tree").kendoTreeView({
    checkboxes: {
        checkChildren: true
    },
    dataImageUrlField: 'image',
    dataTextField: "name",
});

Any suggestions?

Thanks,

Paul

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 29 Nov 2012, 09:47 AM
Hello Paul,

The image template cannot be customized at present time. However, you can specify a custom item template that satisfies your requirement:

template: "<img class='k-image' alt='#: item.name #' src='http://mytemplateurl/imagewebservice/#= item.image #' />#: item.name #"

Kind regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Paul Seabury
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or