This is a migrated thread and some comments may be shown as answers.
Menu problem after Convert project
1 Answer 14 Views
This is a migrated thread and some comments may be shown as answers.
Armin
Top achievements
Rank 1
Armin asked on 03 Aug 2011, 08:20 AM
Hi every one.

I had Telerik 2009 before, and now i update it to 2011.
i have some projects in 2009 and i Change one of them to telerik 2011 manualy.(I Deleted Telerik.Web.UI.dll From BIn and refrences and Put one component in one page that made 2011 DLL and then i add id to refrence manualy from bin folder. but when i create new website it has Telerik.Web.UI.dll.refresh file, but in my previews web applications, Telerik didnt make this file. just Telerik.Web.UI.dll )

I have a strange problem in my menu. in one page of the project that i have a menu in it, it dont show submenus and shows a script error in IE!

its my menu :

 

 

<telerik:RadMenu ID="FarsiMenu" runat="server" DataFieldParentID="MenuParentID" DataNavigateUrlField="AdminValue" DataSourceID="sdsMenuBuilder" DataTextField="MenuText" DataValueField="Value" DataFieldID="MenuID" Width="650px" onprerender="FarsiMenu_PreRender">

 

 

 

</telerik:RadMenu>

 


Its my SqlDataSource :

<

 

 

asp:SqlDataSource ID="sdsMenuBuilder" runat="server"

 

 

 

ConnectionString="<%$ ConnectionStrings:ArminShopConnectionString %>" DeleteCommand="Delete tDynamicMenu

 

Where MenuID=@MenuID"

 

 

InsertCommand="Insert tDynamicMenu (MenuParentID,MenuText,Lang,ShopID,OrderMenu)

 

Values(@MenuParentID,@MenuText,1,@ShopID,@OrderMenu)

"

 

 

ProviderName="<%$ ConnectionStrings:ArminShopConnectionString.ProviderName %>" SelectCommand="Select * From tDynamicMenu

 

Where Lang = 1 And ShopID = @ShopID

Order By OrderMenu"

 

 

UpdateCommand="Update tDynamicMenu

 

Set MenuText=@MenuText ,OrderMenu=@OrderMenu

Where MenuID=@MenuID And ShopID=@ShopID">

 

 

<SelectParameters>

 

 

 

<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />

 

 

 

</SelectParameters>

 

 

 

<DeleteParameters>

 

 

 

<asp:Parameter Name="MenuID" />

 

 

 

</DeleteParameters>

 

 

 

<UpdateParameters>

 

 

 

<asp:Parameter Name="MenuID" />

 

 

 

<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />

 

 

 

</UpdateParameters>

 

 

 

<InsertParameters>

 

 

 

<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />

 

 

 

<asp:Parameter Name="MenuParentID" />

 

 

 

<asp:Parameter Name="MenuText" />

 

 

 

<asp:Parameter Name="OrderMenu" />

 

 

 

</InsertParameters>

 

 

 

</asp:SqlDataSource>

 



And it is FarsiMenu_PreRender function :

using

 

 

Telerik.Web.UI;

 


 

 

protected void FarsiMenu_PreRender(object sender, EventArgs e)

 

{

 

 

try

 

{

 

 

foreach (RadMenuItem rootItem in FarsiMenu.Items)

 

{

rootItem.Attributes.Add(

 

"style", "cursor:pointer");// for root tems

 

SubMenuF(rootItem);

}

}

 

 

catch (Exception)

 

{

}

}

 

 

protected void SubMenuF(RadMenuItem MenuItem)

 

{

 

 

try

 

{

 

 

foreach (RadMenuItem childItem in MenuItem.Items)

 

{

childItem.Attributes.Add(

 

"style", "cursor:pointer");//for child items

 

SubMenuF(childItem);

}

}

 

 

catch (Exception)

 

{

}

}

Any help or suggestion plz? and any better suggestion for convert project better ?
Thanks in Advance.

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 05 Aug 2011, 01:11 PM
Hello Armin,

Please refer to the following help article, on how to upgrade you project with the newer version of the controls,

As for the problem that you are experiencing, please provide us with more information about the javascript error received.

Greetings,
Dimitar Terziev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Menu
Asked by
Armin
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or