jQWidgets Forums

jQuery UI Widgets Forums Grid JavaScript errors when groupable grid is recreated

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 12 years, 1 month ago.

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

  • lopez306
    Participant

    There are some javascript errors when grid is groupable
    1. Click ‘Create’ button,
    2. Click ‘Destroy’ button,
    3. Click ‘Create’ button,
    3. Look at javascript console

    jqwidgets – 2.8
    jquery – 1.9.1

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>This example shows how to create a Grid from Array data.</title>
    <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="js/ext/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxdata.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.pager.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxgrid.grouping.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="jqwidgets/jqxgrid.columnsresize.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var source =
    {
    localdata: [
    ["Alfreds Futterkiste", "Maria Anders", "Sales Representative", "Obere Str. 57", "Berlin", "Germany"],
    ["Ana Trujillo Emparedados y helados", "Ana Trujillo", "Owner", "Avda. de la Constitucin 2222", "Mxico D.F.", "Mexico"],
    ["Antonio Moreno Taquera", "Antonio Moreno", "Owner", "Mataderos 2312", "Mxico D.F.", "Mexico"],
    ["Around the Horn", "Thomas Hardy", "Sales Representative", "120 Hanover Sq.", "London", "UK"],
    ["Berglunds snabbkp", "Christina Berglund", "Order Administrator", "Berguvsvgen 8", "Lule", "Sweden"],
    ["Blauer See Delikatessen", "Hanna Moos", "Sales Representative", "Forsterstr. 57", "Mannheim", "Germany"],
    ["Blondesddsl pre et fils", "Frdrique Citeaux", "Marketing Manager", "24, place Klber", "Strasbourg", "France"],
    ["Blido Comidas preparadas", "Martn Sommer", "Owner", "C\/ Araquil, 67", "Madrid", "Spain"],
    ["Bon app'", "Laurence Lebihan", "Owner", "12, rue des Bouchers", "Marseille", "France"],
    ["Bottom-Dollar Markets", "Elizabeth Lincoln", "Accounting Manager", "23 Tsawassen Blvd.", "Tsawassen", "Canada"],
    ["B's Beverages", "Victoria Ashworth", "Sales Representative", "Fauntleroy Circus", "London", "UK"],
    ["Cactus Comidas para llevar", "Patricio Simpson", "Sales Agent", "Cerrito 333", "Buenos Aires", "Argentina"],
    ["Centro comercial Moctezuma", "Francisco Chang", "Marketing Manager", "Sierras de Granada 9993", "Mxico D.F.", "Mexico"],
    ["Chop-suey Chinese", "Yang Wang", "Owner", "Hauptstr. 29", "Bern", "Switzerland"],
    ["Comrcio Mineiro", "Pedro Afonso", "Sales Associate", "Av. dos Lusadas, 23", "Sao Paulo", "Brazil"],
    ["Consolidated Holdings", "Elizabeth Brown", "Sales Representative", "Berkeley Gardens 12 Brewery", "London", "UK"],
    ["Drachenblut Delikatessen", "Sven Ottlieb", "Order Administrator", "Walserweg 21", "Aachen", "Germany"],
    ["Du monde entier", "Janine Labrune", "Owner", "67, rue des Cinquante Otages", "Nantes", "France"],
    ["Eastern Connection", "Ann Devon", "Sales Agent", "35 King George", "London", "UK"],
    ["Ernst Handel", "Roland Mendel", "Sales Manager", "Kirchgasse 6", "Graz", "Austria"]
    ],
    datatype: "array"
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxbutton1").click(function () {
    $('<div id="jqxgrid" />').prependTo("#jqxWidget");
    $("#jqxgrid").jqxGrid(
    {
    width: '50%',
    source: dataAdapter,
    altrows: true,
    autoheight: true,
    pageable: true,
    columnsresize: true,
    groupable: true,
    columns: [
    { text: 'Company Name', width: 150 },
    { text: 'Contact Name', width: 130 },
    { text: 'Contact Title', width: 100 },
    { text: 'Address', width: 100 },
    { text: 'City', width: 100},
    { text: 'Country', width: 90 }
    ]
    });
    });
    $("#jqxbutton2").click(function () {
    $("#jqxgrid").jqxGrid('destroy');
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget'>
    <button id="jqxbutton1">Create</button>
    <button id="jqxbutton2">Destroy</button>
    </div>
    </body>
    </html>

    Dimitar
    Participant

    Hello lopez306,

    We confirm the reported issue and will fix it as soon as possible.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.