3.2.0

XML & Grid questions...

Ok, at last I see that it is much better for me now to understand DHTML & other new stuff in bussines... Have bid problem with AJAX, but anyway...

I see, that AW.UI.Table class is capable to load, parse and display the data within the AW.UI.Grid class. It seems to allow dynamical change of XML source to set new data for the grid (AJAX way)...

I am capable of creating PHP script to generate XML source... but when parsing the data...

is there possibility to set the atributes of Table object by node properities ?

something like:

<root columns="5" rows="3000">
   <row>
      <cell></cell>
       .
       .
       .
       <cell></cell>
    </row>

............
</root>


????

Some clue needed realy quickly cause other way my DeadLine forces me to use PHP cenerated JS to patch the grid from within the hidden <Iframe>


Tnanx a lot for help....
ASJ
April 25,
u can navigate in ur XML using xmlParser Javascript, u can get the nodes (texts, attributes etc), so u can set everything u want.

ALEX SAID:

You can do something like -

var node = table.getXML().documentElement.childNodes[1];
var text = AW.ie ? node.text : node.textContent;
alert(text);

It might be childNodes[1] or childNodes[0] depending whether you have anything between <xml> and <updtime>. Also IE and FF treat whitespace differently, so I would still define a column with XPath to avoid all this (XPath = "/updtime" or maybe "//updtime" to be sure :-)

So, u can get the node text and ...

var countRows = Number(nodeValue); // nodevalue hav ur count line string

obj.setRowCount(countRows);

// done

Paulo Cesar Silva Reis (PC from Brazil).
April 25,

This topic is archived.

See also:


Back to support forum