hi team telerik
when i change menu in to rtl Width child menu is not current and Flow and ExpandDirection
i set that in code behind and clientside
please see link picture
http://g.imagehost.org/0021/menuerror.jpg
http://f.imagehost.org/0607/menuerror1.jpg
http://f.imagehost.org/0632/menuerror2.jpg
http://f.imagehost.org/0036/menuerror3.jpg
when i change menu in to rtl Width child menu is not current and Flow and ExpandDirection
i set that in code behind and clientside
<telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemPopulating="itemPopulating" |
Flow="Vertical" style="top: 0px; left: 0px" dir="rtl"> |
<DefaultGroupSettings Flow="Vertical" Width="200" ExpandDirection="Left" /> |
<WebServiceSettings Path="~/RTLSite/UserControlRTL/MenuWebService.asmx" Method="GetMenuCategories" /> |
<LoadingStatusTemplate> |
<asp:Image runat="server" ID="LoadingImage" ImageUrl="~/RTLSite/UserControlRTL/Images/loading1.gif" ToolTip="Loading..." /> |
</LoadingStatusTemplate> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadMenu> |
private void LoadRootNodes() |
{ |
SqlConnection connection = new SqlConnection( |
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); |
SqlCommand selectCommand = new SqlCommand("Menu_Select_FirstLevel_Site", connection); |
selectCommand.CommandType = CommandType.StoredProcedure; |
selectCommand.Parameters.AddWithValue("intContentlId", StrContentCodeId); |
SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); |
DataTable data = new DataTable(); |
adapter.Fill(data); |
foreach (DataRow row in data.Rows) |
{ |
RadMenuItem menuSiteItem = new RadMenuItem(); |
menuSiteItem.Text = row["strMenuName"].ToString(); |
menuSiteItem.Value = row["MenuId"].ToString() + "_" + row["strMenuType"].ToString(); |
menuSiteItem.ExpandMode = MenuItemExpandMode.WebService; |
//if (row["ChildrenCount"].ToString() == "0") |
// node.ExpandedImageUrl = "image"; |
// menuSiteItem.GroupSettings.ExpandDirection = ExpandDirection.Left; |
menuSiteItem.Width = 200; |
// menuSiteItem.GroupSettings.Width = 200; |
//menuSiteItem.GroupSettings.Flow = ItemFlow.Vertical; |
RadMenu1.Items.Add(menuSiteItem); |
}//foreach |
} |
webservice |
public RadMenuItemData[] GetMenuCategories(RadMenuItemData item, object context) |
{ |
IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context; |
DataTable productCategories = GetNodeContent(item.Value.Split('_')[0], contextDictionary["ContentId"].ToString());// System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(contextDictionary["ContentId"].ToString()))); |
List<RadMenuItemData> result = new List<RadMenuItemData>(); |
foreach (DataRow row in productCategories.Rows) |
{ |
RadMenuItemData itemData = new RadMenuItemData(); |
itemData.Text = row["strMenuName"].ToString(); |
itemData.Value = row["MenuId"].ToString() + "_" + row["strMenuType"].ToString(); |
if (Convert.ToInt32(row["ChildrenCount"]) > 0) |
{ |
itemData.ExpandMode = MenuItemExpandMode.WebService; |
} |
itemData.PostBack = true; |
result.Add(itemData); |
} |
return result.ToArray(); |
} |
please see link picture
http://g.imagehost.org/0021/menuerror.jpg
http://f.imagehost.org/0607/menuerror1.jpg
http://f.imagehost.org/0632/menuerror2.jpg
http://f.imagehost.org/0036/menuerror3.jpg