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

TreeView Item Images

1 Answer 56 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hind
Top achievements
Rank 1
Hind asked on 28 Oct 2011, 10:23 AM
Hello,

I Have a Treeview, to which i add dynamically  items.
For some items, i need to juxtapose more then images (the images are choosen in function of  a given conditions).

Using the old telerik components, the code is like this:
...
tmpDoc.Text='';
if (Convert.ToBoolean(rowNode["dot_has_life_cycle"]))
{
  tmpDoc.Text += "<img src='../images/colorDot.gif' alt='" + Convert.ToString(rowNode["sta_text"]) + "' style='margin-left:-5px; margin-top:-9px; background-color:" + Convert.ToString(rowNode["sta_color"]) + "' />";
  if (sIcon != "")
       tmpDoc.Text += "<img src='" + sPathImg + "' style='margin-left:3px' /> " + rowNode["doc_name"].ToString();
}
This code doesn't work for the aspnet-Ajax telerik Components ( neither the text nor the images were displayed). So I try to use the "ImageURL" attribute, but the problem that i have more then one image, and also, i have constraints on the margins.

Thank You for helping,

Best Regards,

Hind

1 Answer, 1 is accepted

Sort by
0
Cat Cheshire
Top achievements
Rank 1
answered on 01 Nov 2011, 06:11 PM
Tags
TreeView
Asked by
Hind
Top achievements
Rank 1
Answers by
Cat Cheshire
Top achievements
Rank 1
Share this question
or