Hi Just trying to get to grips with the above, but am a noob.
So I am receiving the following data from an ws.
If am issuing the following when populating the treeview
My CSS looks like this
When I run the code, the tree view displays ok BUT only ever shows the top image from the list in the CSS, namely the TextItem image.
As a noob, I'm not sure where my problem lies. Obviously the sprites png is being found ok and the first item in the list is being loaded, but I'm not sure if there is problem with the way I am doing this or whether there is a problem with my .png. I have noticed that if I inspect the image element sample on the telerik site, Chrome showws a preview of the file, whereas in my sceanrio, Chrome only shows the url to the file.
Any pointers would be gratefully received
S
So I am receiving the following data from an ws.
[{"Key":"M12","Name":"Event Protection","HasChildren":true,"NodeType":"Domain"},{"Key":"M13","Name":"Event Protection from 594","HasChildren":true,"NodeType":"Domain"}, ... ]
If am issuing the following when populating the treeview
var tree = $('#treeview').kendoTreeView({
dataSource : getDefinitions(),
dataTextField : "Name",
dataSpriteCssClassField : "NodeType",
select : function (e) {
var id = this.dataItem(e.node).id;
onChange(id);
}
My CSS looks like this
#treeview .k-sprite {
background-image: url("../../internal/images/treeview-sprites.png");
}
.TextItem { background-position: 0px 0px; no-repeat top left; width: 16px; height: 16px; }
...
.Domain { background-position: 0px -364px; no-repeat top left; width: 16px; height: 16px; }
...
When I run the code, the tree view displays ok BUT only ever shows the top image from the list in the CSS, namely the TextItem image.
As a noob, I'm not sure where my problem lies. Obviously the sprites png is being found ok and the first item in the list is being loaded, but I'm not sure if there is problem with the way I am doing this or whether there is a problem with my .png. I have noticed that if I inspect the image element sample on the telerik site, Chrome showws a preview of the file, whereas in my sceanrio, Chrome only shows the url to the file.
Any pointers would be gratefully received
S