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
1620
Levels[0]: UltraWebTree to WebDataTree:
posted

I am converting Infragistics 2010 v2 CLR3.5 to Infragistics 2014 v2 using 4.5 CLR using Visual Studio 2013 Professional Update 4. I am getting following error while building the project. Please reply immediately..........Try to give solution of below code of using alternative of Levels instead of changing whole functionality. Let me know the alternative of using "Levels" in the existing code plzzzz.

Below error is there while trying to load to get MenuList where "UltraWebTree" being used previously. Now I am upgrading to "WebDataTree" to get functionality, due to which in WebDataTree1 - related to Levels the error is coming:

Error 324 'Infragistics.Web.UI.NavigationControls.WebDataTree' does not contain a definition for 'Levels' and no extension method 'Levels' accepting a first argument of type 'Infragistics.Web.UI.NavigationControls.WebDataTree' could be found (are you missing a using directive or an assembly reference?)

Code is given below:

menuDS.Tables.Add(mnu3Table);
               menuDS.Tables.Add(mnu2Table);
               menuDS.Tables.Add(mnu1Table);
               UltraWebTree1.Levels[0].ColumnName = "Menu2_Nm";
               //WebDataTree1.Nodes[0].Levels[0].ColumnName = "Menu2_Nm"; see this it is not taking Levels of above line, here i need alternative as I can't change code
               
               WebDataTree1.Levels[0].LevelKeyField = "Menu2_ItemID";
               if (menuDS.Tables["Menu3"].Rows.Count > 0)
               {
                   menuDS.Relations.Add("MenuLevel1",
                       menuDS.Tables["Menu2"].Columns["Menu2_ID"],
                       menuDS.Tables["Menu3"].Columns["Menu3_parentID"]);
 
                   WebDataTree1.Levels[0].RelationName = "MenuLevel1"; //here also same error coming
                   WebDataTree1.Levels[1].ColumnName = "Menu3_Nm"; //here also same error coming
                   WebDataTree1.Levels[1].LevelKeyField = "Menu3_ItemID"; //here also same error coming
               }
 
               if (menuDS.Tables["Menu4"].Rows.Count > 0)
               {
                   menuDS.Relations.Add("MenuLevel2",
                       menuDS.Tables["Menu3"].Columns["Menu3_ID"],
                       menuDS.Tables["Menu4"].Columns["Menu4_parentID"]);
                   WebDataTree1.Levels[1].RelationName = "MenuLevel2";
                   WebDataTree1.Levels[2].ColumnName = "Menu4_Nm";
                   WebDataTree1.Levels[2].LevelKeyField = "Menu4_ItemID";
               }
 
               WebDataTree1.DataSource = menuDS;
               WebDataTree1.DataMember = "Menu2";
               WebDataTree1.DataBind();
           }
       }

Parents
No Data
Reply Children