Welcome Guest Search | Active Topics | Sign In | Register

read image path from database for node Options
Peymaneh
Posted: Wednesday, September 19, 2007 11:40:02 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
hi,
I try to make a tree view dynamically by assigning data from database. I want to have image for collapse and expand but when I retrieve it from db, instead of showing the image it shows the image path.
Please tell me what I can do to solve this issue.
Here is my code
<eo:TreeView ID="tvMilestone" runat="server" ControlSkinID="None" AutoScroll="False" DataFields="chCollapseImage|chPageDesc" RaisesServerEvent="True" >

<LookNodes>
<eo:TreeNode DisabledStyle-CssText="" ItemID="_TopLevelItem" NormalStyle-CssText=""
SelectedStyle-CssText="">
<SubGroup Style-CssClass="programmenunodetop" Style-CssText="">
</SubGroup>
</eo:TreeNode>
<eo:TreeNode HoverStyle-CssClass="programmenunodehover" ItemID="_Default" NormalStyle-CssClass="programmenudefault"
SelectedStyle-CssClass="programmenunodeselect">
<SubGroup Style-CssText="">
</SubGroup>
</eo:TreeNode>
</LookNodes>
<Margin Width="0" />
<TopGroup Style-CssClass="programtreeview">
<Bindings>
<eo:DataBinding

Property="CollapsedImageUrl"
DataField="chCollapseImage"
Depth=0
/>
<eo:DataBinding
Property="ExpandedImageUrl"
DataField="chExtendImage"

Depth=0/>
</Bindings>
<Nodes>
<eo:TreeNode
ShowCheckBox="False" RaisesServerEvent="True" PopulateOnDemand="True">
<SubGroup>
<Nodes>
<eo:TreeNode RaisesServerEvent="True" >

</eo:TreeNode>
</Nodes>
<Bindings>
<eo:DataBinding DataField="chMilestoneDesc" />
</Bindings>
</SubGroup>
</eo:TreeNode>
</Nodes>
</TopGroup>
<LineImages Visible="False" />
</eo:TreeView>


eo_support
Posted: Wednesday, September 19, 2007 12:25:36 PM
Rank: Administration
Groups: Administration

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

The problem is caused by:

Code: HTML/ASPX
DataFields="chCollapseImage|chPageDesc"


When you use DataFields, whatever you put there goes into node Text, unless you explicitly override it with a DataBinding object:

Code: HTML/ASPX
<eo:DataBinding Property="Text-Html" DataField="chPageDesc"/>


Without the above data binding object, node on the first level will take chCollapseImage as node text as you have noticed.

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.