Hi Daniil, I have the same issue, I noticed a repeating pattern on the forums where people ask for a question and they you reply with give an example and the person leaves and the thread is just abandoned.
Actually it renders the forum quit useless today alone I have hit 10 threads where they simply end with you asking for an example.
So in an effort to provide an example to help you narrow down to the issue here is my code
controller
public class EmployeeSearchController : Controller
{
//
// GET: /EmplyeeSearch/
public ActionResult Index()
{
return View();
}
[HttpPost]
public ActionResult SearchEmployees(EmployeeSearchVM x)
{
ECIS.BLL.EmployeeJobBLL bll = new ECIS.BLL.EmployeeJobBLL();
List<EmployeeJob> empJobs = bll.SearchEmployees(x.SearhParams.EmployeeNum, x.SearhParams.OrgCode, x.SearhParams.FirstName, x.SearhParams.LastName);
return PartialView("_EmployeeSearchResults", empJobs);
}
public ActionResult GetData(EmployeeSearchVM x)
{
ECIS.BLL.EmployeeJobBLL bll = new ECIS.BLL.EmployeeJobBLL();
List<EmployeeJob> empJobs = bll.SearchEmployees(x.SearhParams.EmployeeNum, x.SearhParams.OrgCode, x.SearhParams.FirstName, x.SearhParams.LastName);
return this.Store(empJobs);
}
}
main search view
@model ECIS.UI.Models.EmployeeSearchVM
@{
ViewBag.Title = "Employee Search";
}
<link href="~/Content/JQueryGrid/grid-0.5.6.min.css" rel="stylesheet" />
@*<link href="~/Content/bootstrap-theme.min.css" rel="stylesheet" />*@
<script src="~/Scripts/Grid/grid-0.5.6.min.js"></script>
@using (Ajax.BeginForm("SearchEmployees", "EmployeeSearch", new System.Web.Mvc.Ajax.AjaxOptions { UpdateTargetId="DivSearchResults" })) //, new { @class = "form-horizontal", role = "form" }))
{
<br />
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Employee Search Parameters</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group col-md-3">
@Html.LabelFor(m=>m.SearhParams.EmployeeNum)
@Html.TextBoxFor(m => m.SearhParams.EmployeeNum, new { @class = "form-control", @Id = "EmployeeNumberSearch" })
</div>
<div class="form-group col-md-3">
@Html.LabelFor(m => m.SearhParams.OrgCode)
@Html.TextBoxFor(m => m.SearhParams.OrgCode, new { @class = "form-control", @Id = "OrgCodeSearch" })
</div>
<div class="form-group col-md-3">
@Html.LabelFor(m => m.SearhParams.FirstName)
@Html.TextBoxFor(m => m.SearhParams.FirstName, new { @class = "form-control", @Id = "FirstNameSearch" })
</div>
<div class="form-group col-md-3">
@Html.LabelFor(m => m.SearhParams.LastName)
@Html.TextBoxFor(m => m.SearhParams.LastName, new { @class = "form-control", @Id = "LastNameSearch" })
</div>
</div>
<div class="row">
<div id="divShowActionbtn" class="form-group col-md-12">
<button type="submit" id="btnSearch" class="btn btn-default">Search</button>
</div>
</div>
</div>
</div>
</div>
}
<div id="DivSearchResults"></div>
partial view to fit inside the DivSearchResults
@model IEnumerable<ECIS.Model.EmployeeJob>
<script>
var EmployeeRenderer = function (value, p, record) {
var empNum = record.data.Employee.EmployeeNumber;
var jobSuf = record.get("JobSuffix");
var PosNum = record.get("PositionNumber");
var params = {
PositionNumber: PosNum,
JobSuffix: jobSuf
};
var url = "<a href=\"././Employee/EmployeeDetails/" + empNum + "?" + $.param(params) + "\" class=\"btn-link\" style=\"color:blue\">" + empNum + "</a>";
// console.log();
return url;
};
var EmployeeNameRenderer = function (value) {
return value.EmployeeFullName;
};
var onComboBoxSelect = function (combo) {
var store = combo.up("gridpanel").getStore();
store.pageSize = parseInt(combo.getValue(), 10);
store.reload();
};
</script>
<br /><br />
<a class="btn-link">asdfasdfasdv</a>
<br /><br />
@(Html.X().GridPanel()
.Title("Array Grid")
.Width(1200)
.Store(
Html.X().Store().ID("Store1").Model(Html.X().Model()
.Fields(
new ModelField() { Name = "Employee", Type = ModelFieldType.Object },
new ModelField() { Name = "Employee", Type = ModelFieldType.Object },
new ModelField("PositionNumber"),
new ModelField("JobSuffix"),
new ModelField("JobTitleDesc"),
new ModelField("EmployeeOrgCode")
)
.IDProperty("Employee.EmployeeNumber,PositionNumber,JobSuffix")
)
.DataSource(Model)
.ServerProxy(Html.X().AjaxProxy().Url(Url.Action("GetData", "Test")))
.PageSize(10)
)
.ColumnModel(
//Html.X().RowNumbererColumn().Width(50),
Html.X().Column().Text("Employee Number").DataIndex("Employee").Width(200).Renderer("EmployeeRenderer"),
Html.X().Column().Text("Employee Name").DataIndex("Employee").Width(300).Renderer("EmployeeNameRenderer"),
Html.X().Column().Text("Position Number").DataIndex("PositionNumber").Width(125).Renderer(RendererFormat.None),
Html.X().Column().Text("Job Suffix").DataIndex("JobSuffix").Width(125),
Html.X().Column().Text("Job Title Desc").DataIndex("JobTitleDesc").Width(200),
Html.X().Column().Text("Org. Code").DataIndex("EmployeeOrgCode").Width(200)
)
.SelectionModel(
Html.X().RowSelectionModel().Mode(SelectionMode.Multi)
)
.View(Html.X().GridView().StripeRows(true))
.BottomBar(
Html.X().PagingToolbar()
.Items(
Html.X().Label("Page size:"),
Html.X().ToolbarSpacer(10),
Html.X().ComboBox()
.Width(80)
.Items("1", "2", "10", "20")
.SelectedItems("10")
.Listeners(l =>
{
l.Select.Fn = "onComboBoxSelect";
})
)
.Plugins(Html.X().ProgressBarPager())
)
)
fully exception text
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
</td>
</tr>
</table>
<br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[Exception: Probably ResourceManager is not defined in the View]
Ext.Net.ExtNetTransformer.Transform(String text) +162
Ext.Net.InitScriptFilter.Transform() +77
Ext.Net.InitScriptFilter.Flush() +47
System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr) +9646489
System.Web.HttpResponse.FilterOutput() +104
System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +49
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
</pre></code>
</td>
</tr>
</table>
<br>
<hr width=100% size=1 color=silver>
<b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34209
</font>
</body>
</html>
<!--
[Exception]: Probably ResourceManager is not defined in the View
at Ext.Net.ExtNetTransformer.Transform(String text)
at Ext.Net.InitScriptFilter.Transform()
at Ext.Net.InitScriptFilter.Flush()
at System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr)
at System.Web.HttpResponse.FilterOutput()
at System.Web.HttpApplication.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System
shared layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - @ECIS.UI.Resources.Global.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
@RenderSection("headtag", false)
</head>
<body>
@Html.X().ResourceManager(ViewBag.ManagerConfig as MvcResourceManagerConfig)
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink(@ECIS.UI.Resources.Global.Title, "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Dashboard", "Index", "Dashboard")</li>
<li>@Html.ActionLink("Employee Search", "Index", "EmployeeSearch")</li>
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("User Admin", "Index", "UserAdmin")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
<p class="nav navbar-text navbar-right">Hello, @User.Identity.Name!</p>
</div>
</div>
</nav>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
</footer>
</div>
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>