Hi,
I am binding the tree using xmlsource. I want to bind a directory and the corresponding folders and files to the tree. I am getting the details of that directory using a webservice and then stroing that information into a Dataset. Then i am converting that dataset into xmlsource and then binding it to the tree. the following is the design for the treeview in aspx..
<ignav:UltraWebTree ID="treedatastore" runat="server" CheckBoxes="True" Height="100%" Width="100%">
<DataBindings>
<ignav:NodeBinding DataMember="treenode" TagField="NavigateUrl" TextField="Text" ToolTipField="ToolTip" ImageUrlField="ImageUrl" />
</DataBindings>
</ignav:UltraWebTree>
The code in CS
protected string MAINNODEHEADER = "<treenode Name='MainNode' ImageUrl='./Images/ig_treeXPFolderOpen.gif' Text='MAINNODEHEADER' >";
protected string FILESDETAILS = "<treenode Name='CYD' ImageUrl='./Images/text.gif' Text='FILESDETAILS' ToolTip='TOOLTIP' >";
protected const string TREEFOOTER = "</TREENODES>";
XmlDataSource xmlds1 = new XmlDataSource();
{
try
retstring = TREEHEADER;
//string tempreplace = AppendPattern(folder,"/");
retstring += tempstr;
retstr += tempstr;
retstr += tempdir;
string fileName = fi.Name.ToString();
string tempretstr = ReplacePattern("FILESDETAILS", fileName, FILESDETAILS);
retstr += temptip;
retstr += CHILDFOOTER;
}
xmlds.Data = retstr;
treeDataStore.DataBind();
treeDataStore.ExpandAll();
else
treeDataStore.DataSource = xmlds;
It's working fine.. the problem is that when i click on a node the selectedimage shouldnot change. for example if there are folder inside that directory. i will be assigning an image to it and when i click on that node the image should not change at all..but when i click on the node the image is changed even though i have not assigned any image for it. there is no server-side code for the treeview except for binding for the treeview. can someone tell me how to go about it? or is there anyway to change the image in the client-side?
Thanks and Regards,
Jollyguy