Author: Sashkanz | Posted on: 10/1/2010 9:26:54 AM | Views : 423

I have a treeview that i fill from a database, when i add a new row to a database, the treeview is not updating.
Even the reload of an internet explorer doesn't help, It does updates only after i press stop debugging button and turn it on again.
Here is the code:

private void MenusBuilder() { //Parent menu extraction DataSet1.TreeItemRow[] cr = GetTreeItemRows(); StringBuilder sb = new StringBuilder(); sb.AppendLine(@"<?xml version=""1.0"" encoding=""utf-8"" ?>"); sb.AppendLine(@"<div id=""menu"">"); string XmlSiteCreator = CreateXmlDataSource(cr, sb); XmlDataSource1.Data = XmlSiteCreator; //Tree Menu TreeView1.DataSourceID = XmlDataSource1.ID; TreeView1.DataBind(); } public static DataSet1.TreeItemRow[] GetTreeItemRows() ...

Go to the complete details ...