Hi.
I've got a webtree which I'm trying to populate two levels of nodes using DemandLoad with manual smart callbacks. The top level works fine, but when I try and populate a child node, I get a Node.DataBind : treeControl parameter invalid error. This doesn't happen after the page posts back. I've attached code for my Demand load functions. The child nodes are populated via the GetBrowseChildren() function.
{
GetBrowseProducts(n, n.Text);
break;
GetBrowseVendor(n, n.Text);
GetBrowseTechnology(n, n.Text);
GetBrowseChildren(n);
}
string strNodeText = n.DataPath.Substring(3);
case "Ve": // "ndor":
queryString =
queryString += strNodeText;
BindBrowserNode(n, queryString, strNodeText);
case "Te": //chnology":
SqlDataAdapter adapter = new SqlDataAdapter(queryString, conn);
adapter.Fill(ds, table);
n.DataBind(ds.Tables[table].DefaultView, table);
Hello,
The ManualSmartCallbacks mode does have its limitations and databiding the treeview in the callback event handler or populating several levels of nodes at once (with child nodes) is I think not supported out of the box.
Is it possible for you to modify your scenario, so that you iterate through the DataTable of nodes and add to the expanded node on each expand request?