jQuery UI Widgets Forums Lists DropDownList $.jqx is undefined, result in undefined dataAdapter

This topic contains 20 replies, has 4 voices, and was last updated by  mrueda 6 years, 8 months ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author

  • Peter Stoev
    Keymaster

    Hi Gowri,

    I do not see a reference to the jQuery Framework. It is required as jQWidgets depends on jQuery. You should also load jQuery before doing anything else.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    Gowri
    Participant

    peter,
    Am I missing any references…?

     <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/knockout-2.2.1.js"></script>
    <script src="~/Scripts/knockout-mapping-2.0.0.js"></script>
    <link href="~/Content/Bootstrap/css/bootstrap-responsive.css" rel="stylesheet" />
    <link href="~/Content/Bootstrap/css/docs.css" rel="stylesheet" />
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.columnsresize.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    $(document).ready(function () {  
    var theme = getDemoTheme();
    var url = "Controller/Action";
    // prepare the data
    var source = {
    datatype: "json",
    datafields: [{ name: 'Name', type: 'string' },
    { name: 'Comments', type: 'string' },
    { name: 'CreatedBy', type: 'int' },
    { name: 'CanDelete', type: 'string' },
    { name: 'CreatedDate', type: 'string' }],
    id: 'Id',
    url: url
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid({
    width: 670,
    source: dataAdapter,
    theme: theme,
    columnsresize: true,
    columns: [{ text: 'Name', datafield: 'Name', width: 250 },
    { text: 'Comments', datafield: 'Comments', width: 250 },
    { text: 'CreatedBy', datafield: 'CreatedBy', width: 180 },
    { text: 'CanDelete', datafield: 'CanDelete', width: 120 },
    { text: 'CreatedDate', datafield: 'CreatedDate', minwidth: 120 }]
    });
    });

    Regards,
    Gowri


    Peter Stoev
    Keymaster

    Hi Gowri,

    Is that ASP .NET? If it is, then you should better look at the ASP .NET Integration help topics which demonstrate how and where the files should be added and how you should reference them in your application.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    Gowri
    Participant

    Peter,
    It is not ASP.NET it is MVC 4 with HTML 5 application

    Regards,
    Gowri


    Peter Stoev
    Keymaster

    Hi Gowri,

    MVC 4 is ASP .NET MVC 4 as far as I know. Here’s is the help topic: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp.net-integration/asp.net-binding-to-sql-database-mvc4.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    mrueda
    Participant

    Hello, if someone has not solved this error, the solution that I made was to place my

    @Scripts.Render(“~/bundles/jquery”)
    @Scripts.Render(“~/bundles/bootstrap”)
    @RenderSection(“scripts”, required: false)

    of all Jqwidgets and jquery scripts

    I hope I have helped some! greetings from Guatemala

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.