Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created tree view which is binding categories and subcategories from data base.


i want to display icon image on left side of tree view . for example, in treeview i have categories such as amana tool as a parent node. and the router bits is child node of parent node(amana tool). so, in data base i have icon image of amana tool as well as icon image of router bits. now, i am able to show categories (amana tool) only in tree view. but, i need that left side should show the icon image of it's related categories and then categories name(amana tool).


Note : an image icon should bind from data base not static. because i need to show morethan 100 categories and it's icon image which is existing in data base.

please help me out.
Posted
Updated 11-Jul-13 3:55am
v2
Comments
Sergey Alexandrovich Kryukov 11-Jul-13 9:59am    
And what's the problem? What have you tried?
—SA
[no name] 11-Jul-13 10:53am    
Why do you keep posting the same thing over and over?

1 solution

I believe I understand what you're asking.

First, you need to know how to add icons to a treeview. I'm not sure if you know how to do this or not as you have not posted any code. Please refer to This Article[^] for information.

Second, you're stating that you don't want to have a static image list, but a dynamic one. You'll have to download the icons from the DB and dynamically load them to your image list at run time. Manage which icon in the array belongs to each category and make them show up as per the article above.

If you want code to help with the solution, you'll have to update your question with code to reference against. Good luck!

Hogan
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900