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
510
UltraWebMenu DataBind() throwing error - Column does not belong to table
posted

Hi,

I've a VS 2003 project which is using Infragistics 2005 vol 2. I upgraded the project to VS 2010 (CLR 4) and Infragistics to 2011 Vol 1 (with hotfix).
I've a helper method as given below:
***
public static void LoadMenu(Infragistics.WebUI.UltraWebNavigator.UltraWebMenu TopMenu)
{
int MaxLevelsToLoad = 10;
int CurrentLevel = 0;
int NextLevel = 0;
string LevelRelationName;
string menuKey;
DataSet menuData;

            menuKey = string.Format("MENU{0}", ABContent.ContentSystem.ContentDirector.UserWebRights.Signature);

if(HttpContext.Current.Cache[menuKey] == null)
{

if(ConfigurationManager.AppSettings["MaxMenuLevels"] != null)
{
MaxLevelsToLoad = int.Parse(ConfigurationManager.AppSettings["MaxMenuLevels"]);
}

menuData =  ContentHelper.GetTopMenuData();
HttpContext.Current.Cache.Insert(menuKey, menuData);

}
else
{
menuData =  (DataSet)HttpContext.Current.Cache[menuKey];
}


            TopMenu.DataSource = menuData;
TopMenu.DataMember = "Level0";
for(int LevelIndex = 0;LevelIndex < MaxLevelsToLoad;LevelIndex++)
{
CurrentLevel = LevelIndex;
NextLevel = CurrentLevel + 1;
TopMenu.Levels[LevelIndex].LevelKeyField = "NavId";
TopMenu.Levels[LevelIndex].ColumnName = "NavName";
TopMenu.Levels[LevelIndex].TargetUrlName = "Url";
TopMenu.Levels[LevelIndex].TargetFrameName = "Target";
if(CurrentLevel < MaxLevelsToLoad)
{
LevelRelationName = "Level" + NextLevel.ToString() + "Level" + CurrentLevel.ToString(); 
TopMenu.Levels[LevelIndex].RelationName = LevelRelationName;
}
}

TopMenu.DataBind();

}
***
At the line where it says "TopMenu.DataBind()", the program is throwing an exception - 
Column '' does not belong to table Level1.

I am unable to figure out the reason. The old application runs fine without any program changes.

I tried few changes as suggested in "http://www.dotnet247.com/247reference/msgs/41/205926.aspx", but nothing worked.

Any ideas?

Thanks,
Kala

Parents
No Data
Reply Children
No Data