locked
Issues in setting up jqgrid in asp.net core development. RRS feed

  • Question

  • User1984354752 posted

    Hi there:

    I'm trying to  set up jqgrid in asp.net core project. I installed the Nutnet package but I came across with the same issue explain in this Post: https://forums.asp.net/t/2145744.aspx?Jquery+Jqgrid+Free+Jqgrid+in+net+Core+2+1

    I followed the instructions but the window shell returns this message:

    PS C:\Users\josec\source\repos\HousingManagement> npm i free-jqgrid --save-dev
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + npm i free-jqgrid --save-dev
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\Users\josec\source\repos\HousingManagement> npm init
    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + npm init
    + ~~~
    + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\Users\josec\source\repos\HousingManagement>

     Is there any easy way to set up jqgrid in as[.net core development......with Asp.net was quite easy.

    Thanking you in advance. 

    Tuesday, June 30, 2020 9:00 PM

All replies

  • User475983607 posted

    9peculiar

     Is there any easy way to set up jqgrid in as[.net core development......with Asp.net was quite easy.

    I'll assume you are building a web application and not an SPA. 

    Right click the project.  Hover over Add -> Client-side library.  Type jqgrid in the library input.  From thre you can select the files you want to install and the location.   Remember to add file references in the layout.cshtml file.

    Reference docs.

    https://docs.microsoft.com/en-us/aspnet/core/client-side/libman/libman-vs?view=aspnetcore-3.1

    You can also simply download the files to any folder.

    Tuesday, June 30, 2020 10:14 PM
  • User-939850651 posted

    Hi 9peculiar,

    npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program.

    Have you tried searching this question? I think this may be your main problem.

    It means that you have not installed node.js or the installed version is too old, please refer to this document, or you could choose to integrate it in the Visual Studio Installer.

    On the other hand, about installing NuGet packages, you could try this step:

    Right-click the project --> select "Manage NuGet Package" --> select "Browse" --> enter the query keyword "jquery jqgrid" --> select NuGet package to install

    Best regards,

    Xudong Peng

    Wednesday, July 1, 2020 8:23 AM
  • User1984354752 posted

    Dear Mgebhard:

    I followed your advice so I managed to install all the jqgrid library. Now the problem is that the jqgrid doesn't look "pretty" so I don't know if I'm missing a reference ....can you please check for me ? 

    <script src="~/lib/jquery/dist/jquery.js"></script>
    <link href="~/lib/jqgrid/css/ui.jqgrid-bootstrap4.css" rel="stylesheet" />

    <script src="~/lib/jqgrid/js/i18n/grid.locale-en.js"></script>

    <script src="~/lib/jqgrid/js/jquery.jqGrid.js"></script>

    Thursday, July 2, 2020 8:18 PM
  • User475983607 posted

    Looks like you forgot the jqgrid css file references in your layout view.   Please see the jqgrid docs.

    Thursday, July 2, 2020 10:55 PM