Welcome Guest Search | Active Topics | Sign In | Register

Treeview : Is it possible to implement conditional formatting? Options
Matt
Posted: Thursday, January 29, 2009 12:47:15 PM
Rank: Newbie
Groups: Member

Joined: 1/29/2009
Posts: 4
We would like to use your product to organize and maintain our Orginizational Chart in our company. I would like to be able to implement the treeview so that it populates according to our org chart (did this successfully). When the treeview is loaded however I would like for Managers/Employees that have a status of retired or terminated to appear in red or with a line through them so that the use knows that this Managers employees needs to be addressed.

Please advise if this is capable with your control?

Thanks
eo_support
Posted: Thursday, January 29, 2009 1:02:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Yes. You can do that with or without code easily. The key for this is each TreeNode has a "LookID" property.

A TreeNode’s LookID points to a look item with a matching “ItemID” value, which are defined within the TreeView's "Look items" collection. The whole purpose of a look item is to define the appearance settings for real tree nodes. You can find more information about look items at here:

http://doc.essentialobjects.com/ViewDoc.aspx?book=1&t=MenuCommon%2fLookSkinAndTheme%2flooks.html

In your case, you would need to first define a look item with the desired appearance (red text color, for example), then set certain nodes’ LookID to the ID of that item either by code or through data binding. Setting it with code is rather straight forward; you would simply assign a value to the TreeNode’s LookID property. If you already use data binding, you can let data binding does the job for you by defining a DataBinding object, which maps a data field to the LookID property. This link contains more information about how to do this:

http://doc.essentialobjects.com/ViewDoc.aspx?book=1&t=MenuCommon%2fDataBinding%2fpopulate_table.html

Hope this helps.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.