This question is locked. New answers and comments are not allowed.
Hi
I have this scenario, I'm creating a page with MVC tabstrip control binding with model, which the model just provide the tab navigationdata, and also I create a partial view with telerik MVC grid control to show the content for each tab, the content is depend on which tab is selected, and inside the navigationdata model, I provide controllername, actionname, routevalues which used for tab item generating, inside routevalues, there's an Id value which used to retrieve data as the parameter, everthing works well, but onething I'm not sure is the partial view suppose to show inside tabitem but instead it showed in a grand new page, anybody can help to figure out where is wrong? Very appreciated!
Here is the aspx file
Here is the partial view ascx file
And here is the controller actions, one is to pass the navigationdata to tabstrip, one is to pass the tabcontent data
I have this scenario, I'm creating a page with MVC tabstrip control binding with model, which the model just provide the tab navigationdata, and also I create a partial view with telerik MVC grid control to show the content for each tab, the content is depend on which tab is selected, and inside the navigationdata model, I provide controllername, actionname, routevalues which used for tab item generating, inside routevalues, there's an Id value which used to retrieve data as the parameter, everthing works well, but onething I'm not sure is the partial view suppose to show inside tabitem but instead it showed in a grand new page, anybody can help to figure out where is wrong? Very appreciated!
Here is the aspx file
| <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OrganizationUsersViewModel>" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> |
| <h2><%=iNuggets.Resources.Globalization.MyOrganizationUsers%></h2> |
| <% |
| Html.Telerik().TabStrip() |
| .Name("TabStrip") |
| .BindTo(Model.OrganizationNavigationData, |
| (item, OrganizationNavigationData) => |
| { |
| item.Text = OrganizationNavigationData.Text; |
| //item.ImageUrl = OrganizationNavigationData.ImageUrl; |
| //item.Url = OrganizationNavigationData.NavigateUrl; |
| item.ActionName = OrganizationNavigationData.ActionName; |
| item.ControllerName = OrganizationNavigationData.ControllerName; |
| item.RouteValues = OrganizationNavigationData.routeValues; |
| }) |
| .Render(); |
| %> |
| </asp:Content> |
| <asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server"> |
| </asp:Content> |
| <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<OrganizationUsersPartialViewModel>" %> |
| <% |
| if (Model.OrganizationUsers != null) |
| { |
| Html.Telerik().Grid(Model.OrganizationUsers) |
| .Name("OrganizationUsers") |
| .DataKeys(keys => keys.Add(c => c.ID)) |
| .Columns(columns => |
| { |
| columns.Bound(c => c.UserName).Width(130); |
| columns.Bound(c => c.Email).Width(130); |
| }) |
| .Pageable() |
| .Sortable() |
| .Render(); |
| } |
| %> |
| public ActionResult MyOrganizationUsers() |
| { |
| Guid userId = (Guid)System.Web.HttpContext.Current.Session["session_UserId"]; |
| OrganizationUsersViewModel model = new OrganizationUsersViewModel |
| { |
| OrganizationNavigationData = OrganizationNavigationDataBuilder.BuildOrganizationNavigationData(OrganizationUsersRepository.GetOrganizationsAdmined(userId, 1, 10)) |
| }; |
| return View(model); |
| } |
| public ActionResult MyOrganizationUsersPartial(string OrganizationId) |
| { |
| Guid myOrganizationId = new Guid(OrganizationId); |
| OrganizationUsersPartialViewModel model = new OrganizationUsersPartialViewModel |
| { |
| OrganizationUsers = OrganizationUsersRepository.All(myOrganizationId,1,10) |
| }; |
| return PartialView(model); |
| } |