3.0 beta 2

XML data island example (2.0b1)

Here is an example of using XML data island for 2.0b1 (IE only):

    <title>ActiveWidgets Grid :: Examples</title>
    <style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>

    <!-- 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 -->
        .aw-grid-control {height: 100%; width: 100%; border: none; font: menu;}

        .aw-column-0 {width:  80px;}
        .aw-column-1 {width: 200px; background-color: threedlightshadow;}
        .aw-column-2 {text-align: right;}
        .aw-column-3 {text-align: right;}
        .aw-column-4 {text-align: right;}

        .aw-grid-cell {border-right: 1px solid threedshadow;}
        .aw-grid-row {border-bottom: 1px solid threedlightshadow;}

    <xml id="xmlDataIsland">
                <name>Microsoft Corporation</name>
                <name>Oracle Corporation</name>
                <name>SAP AG (ADR)</name>
                <name>Computer Associates Inter</name>
                <name>Electronic Arts Inc.</name>

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

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

    //	IE
    if (window.ActiveXObject) {
        xml = node;
    //	Mozilla
    else {
        xml = document.implementation.createDocument("","", null);

    //	provide data XML

    //	define column labels
    var columns = ["Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"];

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


    //	provide column labels

    //	provide external model as a grid data source

    //	write grid html to the page

Alex (ActiveWidgets)
October 20,
That really helps. One problem though. When I linked to an external xml file I didn't need to specify the rowcount property. But with your example, if I don't specify it, the grid appears empty??
Any reason why?
Are there derived properties from an xml file that I am missing by using an xml island??
Jim Shaffer
October 20,
October 25,
Uppss ...should be:
October 25,
Hi Alex,

Data island works on some IE browsers where as on other IE browsers it does not work.

Error: Object doesn't support this property or method.

Does it need something on client side in order to successfully work.

I did not into such problems when I use XML url based grids.

Girish Khemani, Fidelity India
August 6,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.