Setting the image of a tree node in a grid

Hello,

I have a grid that has it’s first column type as “tree” (not “stree”, it doesn’t work with it).
I’m loading the data with an inline dataset as a json.

Can I specify the img of the node through there?

Hello,

yes, you should be able to specify the column value as an object with {value: text, image: imgPath}. Note that this imgPath will be added to the url specified in setImagePath

myTreeGrid.parse({
	rows:[
		{
			id:'1001', 
			data:[
				{ value:"row A", image:"image.png"},
				"A Time to Kill",
				"John Grisham",
				"12.99",
				"1",
				"05/01/1998"
			],
			rows:[
		//		...
			]
		},
	//	...
		]
	}, "json");
1 Like