3.2.0

Bug in Sort Method

Hello...

I have this page html that is very similar to the example "xml - data island - xpath.htm " but when i order the grid throw a column header..the order is not working fine..

<html>
<head>
    <title>ActiveWidgets Grid :: Examples</title>

    <!-- ActiveWidgets stylesheet and scripts -->
    <link href="../../runtime/styles/xp/aw.css" rel="stylesheet" type="text/css" ></link>
    <script src="../../runtime/lib/aw.js"></script>

    <!-- grid format -->
    <style>
        .aw-grid-control {height: 150px; width: 100%; font: menu;}
    </style>
</head>
<body>
    <!--xml id="xmlDataIsland">
        <companies>
            <company>
                <ticker>MSFT</ticker>
                <name>Microsoft Corporation</name>
                <mktcap>314,571.156</mktcap>
                <sales>32,187.000</sales>
                <employees>55000</employees>
            </company>
            <company>
                <name>Oracle Corporation</name>
                <mktcap>62,615.266</mktcap>
                <sales>9,519.000</sales>
                <employees>40650</employees>
            </company>
            <company>
                <ticker>SAP</ticker>
                <sales>8,296.420</sales>
            </company>
        </companies>
    </xml -->
        <xml id='xmlDataIsland'>
            <Entities>
                <Row><GRUPO>01 - Inversiones en Software</GRUPO><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Software de aplicación Varios (u$s)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Project Server (u$s)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Consultoría Project Server (u$s)</D01><MES_01>777</MES_01><MES_02>15</MES_02><MES_03>15</MES_03><MES_04>15</MES_04><MES_05>15</MES_05><MES_06>15</MES_06><MES_07>15</MES_07><MES_08>15</MES_08><MES_09>15</MES_09><MES_10>15</MES_10><MES_11>15</MES_11><MES_12>15</MES_12><MES_13>15</MES_13><MES_14>15</MES_14><MES_15>15</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Reemplazo Servidores Base de Datos Site (u$s)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>RRHH Licencia y Capacitación ($)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>RRHH Implementación ($)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><GRUPO>02- Inversiones en horas de Desarrollo</GRUPO><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Horas de Desarrollo - Cuota DOLARES (u$s)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Horas de Desarrollo - Cuota PESOS ($)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Excedente Desarrollo-Evolución ($)</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><GRUPO>03 - Inversiones en Equipos</GRUPO><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Bien 1</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
                <Row><CHECKBOX>1</CHECKBOX><D04>CENT_COSTO772</D04><D01>Bien 2</D01><MES_01>777</MES_01><MES_02>0</MES_02><MES_03>0</MES_03><MES_04>0</MES_04><MES_05>0</MES_05><MES_06>0</MES_06><MES_07>0</MES_07><MES_08>0</MES_08><MES_09>0</MES_09><MES_10>0</MES_10><MES_11>0</MES_11><MES_12>0</MES_12><MES_13>0</MES_13><MES_14>0</MES_14><MES_15>0</MES_15><D03>GEOGRAFICA12</D03></Row>
            </Entities></xml>
    <script>

    //	create ActiveWidgets data model - XML-based table
    var table = new AW.XML.Table;

    //  get reference to the xml data island node (IE)
    var xml = document.getElementById("xmlDataIsland");

    //	set columns XPath
    //table.setColumns(["ticker", "name", "mktcap", "sales", "employees"]);
    table.setColumns(["GRUPO", "D01", "MES_01", "MES_02","MES_03", "MES_04", "MES_05", "MES_06","MES_07", "MES_08", "MES_09", "MES_10","MES_11", "MES_12", "MES_13", "MES_14","MES_15"]);

    //	define data formats
    var str = new AW.Formats.String;
    var num = new AW.Formats.Number;

    //table.setFormats([str, str, num, num, num]);
    table.setFormats([str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str]);

    //	provide data XML
    table.setXML(xml);

    //	define column labels
    //var columns = ["Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"];
    var columns=['AGRUPADOR','Dato de Entrada','MES_PRESUP_01','MES_PRESUP_02','MES_PRESUP_03','MES_PRESUP_04','MES_PRESUP_05','MES_PRESUP_06','MES_PRESUP_07','MES_PRESUP_08','MES_PRESUP_09','MES_PRESUP_10','MES_PRESUP_11','MES_PRESUP_12','MES_PRESUP_13','MES_PRESUP_14','MES_PRESUP_15'];

    //	create ActiveWidgets Grid javascript object
    var obj = new AW.UI.Grid;

    obj.setColumnCount(17); //5
    obj.setRowCount(11); //3

    //	provide column labels
    obj.setHeaderText(columns);

    //	provide external model as a grid data source
    obj.setCellModel(table);

    //	write grid html to the page
    document.write(obj);

    </script>
</body>
</html>


Thank you..
Leandro
December 13,

This topic is archived.

See also:


Back to support forum