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
573
igniteUI MVC igGrid Error
posted

I have an ASP.NET MVC Project and I'm trying to add Data Grid from this sample

https://www.igniteui.com/grid/aspnet-mvc-helper

but I have 2 problems

First one


using IgniteUI.SamplesBrowser.Models.Repositories;
using IgniteUI.SamplesBrowser.Application.Data;

I have a red underline on these words ( Repositories - Application ) so I have errors in the Controller

Second one

In the view

<body>

@(Html.Infragistics()
.Grid(Model)
.ID("grid")
.Width("100%")
.Height("500px")
.PrimaryKey("ID")
.AutoGenerateColumns(false)
.AutoGenerateLayouts(false)
.Columns(column =>
.........

....

</body>

I installed Infragistics.Web.Mvc form NuGet Package Manager but I have a red underline on this word ( Infragistics )

Can you solve this problems or give me any working sample?

Thanks

Parents
  • 1320
    Offline posted

    Hello Sameh,

    After investigating this further, I determined that the Infragistics.Web.Mvc should be included in the project by adding a reference and selecting Infragistics.Web.Mvc dll from the Infragistics folder:

    ~\Infragistics\2020.1\Ignite UI for MVC\MVC5\Bin\Infragistics.Web.Mvc.dll

    Furthermore the following line should be added at the begging of the Index.cshtml page

    @using Infragistics.Web.Mvc

    These lines:

    using IgniteUI.SamplesBrowser.Models.Repositories;
    using IgniteUI.SamplesBrowser.Application.Data;

    Are throwing errors because they are referencing files in the project, used for this sample and are missing in the current project. These files are related to the data of the application and the ones for the current data should be referenced instead.

    Below I am attaching a sample, demonstrating remote Filtering, Sorting and Paging, which are applied automatically and the controller contains only the data binding.

    Regards,

    Monika Kirkova,

    Infragistics

    GridData.rar

  • 573
    Offline posted in reply to Monika Kirkova

    Hello 

    I downloaded your sampla and add Infragistics.Web.Mvc reference

    In visual studio I don't have any errors but when i run the project i got empty screen then i opened developer tools console and got these errors

    Mixed Content: The page at 'localhost:44373/.../Index' was loaded over HTTPS, but requested an insecure stylesheet 'cdn-na.infragistics.com/.../infragistics.theme.css'. This request has been blocked; the content must be served over HTTPS.


    Index:46 Mixed Content: The page at 'localhost:44373/.../Index' was loaded over HTTPS, but requested an insecure stylesheet 'cdn-na.infragistics.com/.../infragistics.css'. This request has been blocked; the content must be served over HTTPS.

    5Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS.

    Index:59 Uncaught ReferenceError: $ is not defined
    at Index:59

    Then I changed all http to https and run the project again and i got this erroe in console

    Index:59 Uncaught TypeError: $(...).igGrid is not a function
    at HTMLDocument.<anonymous> (Index:59)
    at j (jquery-1.11.3.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.3.min.js:2)
    at Function.ready (jquery-1.11.3.min.js:2)
    at HTMLDocument.J (jquery-1.11.3.min.js:2)

    so how can i fix it?

    Thanks

Reply Children