This question is locked. New answers and comments are not allowed.
Hi,
I have a scenario that in one aspx page there's a tabstrip and in each tab will show a grid in a partial view, the grid has a standard insert button, the initial loading of this page is perfect, all tab laoded and the grid loaded by demand, but the bad thing is once click the insert button, the content is shown in a totally new whole page but not the right place inside a tab. Anybody can tell me where is incorrect?
Below is my aspx file
And the partial view
And the controller actions
Any reply is very appreciated!
I have a scenario that in one aspx page there's a tabstrip and in each tab will show a grid in a partial view, the grid has a standard insert button, the initial loading of this page is perfect, all tab laoded and the grid loaded by demand, but the bad thing is once click the insert button, the content is shown in a totally new whole page but not the right place inside a tab. Anybody can tell me where is incorrect?
Below is my aspx file
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OrganizationNavigationViewModel>" %> |
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> |
<h2><%=Resources.Globalization.MyOrganizationUserInRole%></h2> |
<% |
Html.Telerik().TabStrip() |
.Name("TabStrip") |
.BindTo(Model.OrganizationNavigationData, |
(item, OrganizationNavigationData) => |
{ |
item.Text = OrganizationNavigationData.Text; |
item.ContentUrl = OrganizationNavigationData.ContenUrl; |
}) |
.SelectedIndex(0) |
.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("OrganizationAdministrator") |
.ToolBar(commands => commands.Insert()) |
.DataKeys(keys => keys.Add(c => c.ID)) |
.Columns(columns => |
{ |
columns.Bound(c => c.UserName).Width(130); |
columns.Bound(c => c.Email).Width(130); |
columns.Bound(c => c.OrganizationRole).Width(130); |
columns.Command(commands => |
{ |
commands.Delete(); |
}).Width("20%").Title(iNuggets.Resources.Globalization.Commands); |
}) |
.DataBinding(dataBinding => |
{ |
dataBinding.Ajax() |
.Select("MyOrganizationUserInRolePartial", "MyOrganization", new { ActionName = "Select" }) |
.Insert("MyOrganizationUserInRolePartial", "MyOrganization", new { ActionName = "Insert" }) |
.Delete("MyOrganizationUserInRolePartial", "MyOrganization", new { ActionName = "Delete" }); |
}) |
.Pageable() |
.Sortable() |
.Render(); |
} |
%> |
public ActionResult MyOrganizationUserInRole() |
{ |
Guid userId = (Guid)System.Web.HttpContext.Current.Session["session_UserId"]; |
OrganizationNavigationViewModel model = new OrganizationNavigationViewModel |
{ |
OrganizationNavigationData = OrganizationNavigationDataBuilder.BuildOrganizationNavigationData(OrganizationUsersRepository.GetOrganizationsAdmined(userId, 1, 10), "MyOrganizationUserInRolePartial") |
}; |
return View(model); |
} |
public ActionResult MyOrganizationUserInRolePartial(string OrganizationId) |
{ |
Guid myOrganizationId = new Guid(OrganizationId); |
OrganizationUsersPartialViewModel model = new OrganizationUsersPartialViewModel |
{ |
OrganizationUsers = OrganizationUsersRepository.GetOrganizationAdministrators(myOrganizationId, 1, 10) |
}; |
return PartialView(model); |
} |
Any reply is very appreciated!