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
385
UltraWebTree Manual Vs. Auto & Ajax
posted

Hello,

I've just started using the UltraWebTree and am having difficulties. However, I'd like to ask about how the tree works with Ajax. From looking at the samples, I can see that you can use manual and automatic modes. But, what is the significance of this? From what I can see, the manual mode requires the DemandLoad event to be populated. But this begs the question: what has this got to do with Ajax? If the tree is simply populating based on an ASP event, isn't this just straight ASP, and not Ajax?

Looking at the automatic mode code (from the samples page), I can't really see how it is working. It shows some setup code, but it doesn't provide any web methods or JavaScript code to explain how to populate the tree with Ajax.

This is the Page_Load code.

            WebPanel2.Visible = WebSamplesCS.Config.ShowDescription;

            // When the LoadOnDemand property is set to Automatic,
            // the database must be bound on each postback.


            // Get Database connection path for nwind.mdb
            oleDbConnection1.ConnectionString = WebSamplesCS.Config.NorthwindMDBConnString;

            customersAdapter.Fill(dataSet11, "Customers");
            ordersAdapter.Fill(dataSet11, "Orders");
            orderDetailsAdapter.Fill(dataSet11, "Order Details");

            try
            {
                dataSet11.Relations.Add("CustOrders",
                    dataSet11.Tables["Customers"].Columns["CustomerID"],
                    dataSet11.Tables["Orders"].Columns["CustomerID"]);
            }
            catch (System.Exception x)
            {
                string s = x.Message;
                Label1.Text = x.Message;
            }

            try
            {
                dataSet11.Relations.Add("OrderDetails",
                    dataSet11.Tables["Orders"].Columns["OrderID"],
                    dataSet11.Tables["Order Details"].Columns["OrderID"]);
            }
            catch (System.Exception x)
            {
                Label1.Text = x.Message;
            }
            this.UltraWebTree1.DataSource = dataSet11;
            this.UltraWebTree1.Levels[0].RelationName = "CustOrders";
            this.UltraWebTree1.Levels[0].ColumnName = "CompanyName";
            this.UltraWebTree1.Levels[1].RelationName = "OrderDetails";
            this.UltraWebTree1.Levels[1].ColumnName = "OrderId";
            this.UltraWebTree1.Levels[2].ColumnName = "ProductId";
            this.UltraWebTree1.DataMember = "Customers";
            this.UltraWebTree1.DataBind();
 

 This is great if your dataset is relational data tables. But, we don't use anything like that. We have our own object model.

So the question is, how can we get the control to use proper Ajax with our object model?

 

Parents Reply Children
No Data