Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
WebDataTree DataBinding Refreshment Issue
posted

Hi

I am creating a  web data tree on the fly, i bind it to xml data source every thing works fine but when i change my data source contents still the tree displays old data source contents !! if i recycle the application pool the new data source is reflected. I know it has something to do with xml datasource because when i change its id the new contents are retrieved 

 

 

 

 

 

WebDataTree

 

 

 

 

 

 tree = new WebDataTree();

tree.Width = new Unit(99, UnitType.Percentage);

tree.Height =

 

new Unit(99, UnitType.Percentage);

tree.EnableAutoChecking =

 

true;

myPanel.Controls.Add(tree);

 

 

XmlDataSource

 

 

 

xmlSource = new XmlDataSource();

xmlSource.ID =

 

"xmlSource1" ;

xmlSource.EnableCaching = false;

xmlSource.Data = "my xml";

 

 

 

DataTreeNodeBinding 

 

 

DimensionHierarchyBinding = new DataTreeNodeBinding();

 

DimensionHierarchyBinding.DataMember =

 

"TreeNode";

DimensionHierarchyBinding.TextField =

 

"NodeText";

DimensionHierarchyBinding.ValueField =

 

"NodeValue";

tree.DataBindings.Clear();

tree.DataBindings.Add(DimensionHierarchyBinding);

tree.DataSource = xmlSource;

tree.DataBind();

/*xml sample 

<TreeNode NodeText="Root">

<TreeNode NodeText="Dept1" NodeValue="1"/>

<TreeNode NodeText="Dept2" NodeValue="2"/>

</TreeNode>

*/

 

 

 

Parents
No Data
Reply
  • 13438
    posted

    Hello Sameh,

    Thank you for posting in our forums. I will need more detail information to help you to resolve this issue. Could you tell me which version of Infragistics controls you are using and the exact build. Does this issue reproduce with all the browsers? The code snippets you sent me are not enough to determine where the issue comes from. I will have to reproduce the same behavior on my side and debug to see if the issue is in our controls or wrong implementation from your side. The best would be to send me an isolated sample with steps to reproduce. From your sample i could not understand what is the type of the panel in which you are putting the tree. Where you rebind the tree and how? Do you clean the datasource (I see you clean the DataBinding) it before this?

    I’m looking forward to hear from you.

Children