jQWidgets Forums

jQuery UI Widgets Forums TreeGrid treegrid

This topic contains 1 reply, has 1 voice, and was last updated by  mustafa 10 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    treegrid Posts
  • treegrid #65223

    mustafa
    Participant

    I am already using the standart grid and working but
    I add treegrid I see this error
    what is this problem ? I don’t understand

    jquery-1.11.0.min.js or jquery-1.11.2.min

    /js/vendor/jquery-1.11.0.min.js
    0x800a01b6 – JavaScript runtime error: Object doesn’t support property or method ‘treeGrid’

    Layout_

    <script src=”/Scripts/jqwidgets/jqxcore.js”></script>
    <script src=”/Scripts/jqwidgets/jqxdata.js”></script>
    <script src=”/Scripts/jqwidgets/jqxbuttons.js”></script>
    <script src=”/Scripts/jqwidgets/jqxscrollbar.js”></script>
    <script src=”/Scripts/jqwidgets/jqxdatatable.js”></script>
    <script src=”/Scripts/jqwidgets/jqxtreegrid.js”></script>

      var source =
                {
                    dataType: "array",
                    dataFields: [
                        { name: "name", type: "string" },
                        { name: "quantity", type: "number" },
                        { name: "id", type: "string" },
                        { name: "parentid", type: "number" },
                        { name: "price", type: "number" },
                        { name: "date", type: "date" },
                        { name: "customer", type: "string" }
                    ],
                    hierarchy:
                    {
                        keyDataField: { name: 'id' },
                        parentDataField: { name: 'parentid' }
                    },
                    id: 'id',
                    localData: generateordersdata()
                };
        var dataAdapter = new $.jqx.dataAdapter(source);
        // create Tree Grid
        $("#treeGrid").jqxTreeGrid(
        {
            width: 850,
            source: dataAdapter,
            sortable: true,
            pageable: true,
            ready: function () {
                $("#treeGrid").jqxTreeGrid('expandRow', '2');
            },
            columns: [
              { text: 'Order Name', dataField: "name", align: 'center', width: 200 },
              { text: 'Customer', dataField: "customer", align: 'center', width: 200 },
              { text: 'Price', dataField: "price", cellsFormat: "c2", align: 'center', cellsAlign: 'right', width: 80 },
              {
                  text: 'Order Date', dataField: "date", align: 'center', cellsFormat: "dd-MMMM-yyyy hh:mm", cellsRenderer: function (rowKey, column, cellValue, rowData, cellText) {
                      if (rowData.level === 0) {
                          return dataAdapter.formatDate(cellValue, "dd-MMMM-yyyy");
                      }
                      return cellText;
                  }
              }
            ]
        });

    html

    <div id=”treeGrid”></div>

    treegrid #65224

    mustafa
    Participant

    I found the problem
    I’m sorry my fault

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.