Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
770
Undefined is not a function MVC Helper error
posted

I tried to use a mix of what i found online and your sample on the IgniteUI page and the default app in VS2012 and the code generated from the mvc helper is saying undefined is not a function.  Here is the code i have on the index and what the controller is doing.

@(Html.Infragistics()

.Grid<NOMISe.eSIMON.Web.UI.Areas.Admin.Models.UserIndexView.UserIndexViewEntity>()
.ID("userGrid")
.Columns(column =>
{
column.For(x => x.ID).HeaderText("ID").DataType("string").Hidden(true);
column.For(x => x.DisplayName).HeaderText("Full Name").DataType("string").Width("20%");
column.For(x => x.Email).HeaderText("Email").DataType("string").Width("20%");
column.For(x => x.Status).HeaderText("Status").DataType("int").Width("10%");
column.For(x => x.Department).HeaderText("Department").DataType("string").Width("25%");
column.For(x => x.ExpirationDate).HeaderText("Expiration Date").DataType("dateLong").Width("25%");
})
.Width("100%")
.Height("600px")
.PrimaryKey("ID")
.DataBind()
.Render()
)

the controller:

[PermissionAttribute(Core.Security.SecurityMask.View)]
public ActionResult Index()
{
UserIndexView viewModel = new UserIndexView();

IEnumerable<UserIndexView.UserIndexViewEntity> userList = from user in userService.All()
select new UserIndexView.UserIndexViewEntity
{
ID = user.ID,
DisplayName = user.DisplayName,
Email = user.Email,
Status = user.Status,
Department = user.Department,
ExpirationDate = user.ExpirationDate
};

viewModel.UserIndexViewEntitys = userList;

return View(viewModel);
}

Parents Reply
  • 29417
    Verified Answer
    Offline posted in reply to Emmanuel

    Hello ekolluri ,

     

    Thank you for the additional information.

     

    The issue you’re getting is due to using the MVC4 assembly instead of the MVC 5 one. This issue has previously been discussed here:

    http://es.infragistics.com/community/forums/t/84498.aspx

     

    I’ve tested how the MVC 5 assembly of version 14.1.20141.2031(latest version at the moment) behaves in an MVC 5 application with the following versions of jquery and jquery ui:

        <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.js"></script>

        <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.20/jquery-ui.js"></script>

     

    When a remote data source url is set. However it works as expected when testing this on my side.

    I’ve attached the MVC 5 application for your reference. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

     

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version version 14.1 service release version: 14.1.20141.2031.

     

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

     

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

     

    Please let me know if I can provide any further assistance.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://es.infragistics.com/support

     

    MVC5_Project.zip
Children