3.0 beta 2

setCellLink in 2.0

Can anybody post a quick example of how to use an external XML file as a data source in 2.0? I know how to do it in Version 1, but can't seem to get the same thing to work in 2. I have a data source of 3,000 records and want to test the virtual mode.

I've looked through all the docs and examples, as well as searched the forum so I don't waste anybody's time, but can't seem to find anything on it.

Any help would be appreciated. Thanks.
December 16,
I guess nobody is using an XML data source in version 2, eh?
December 20,
From the downloaded package please look inside : Localdrive:/Activewidgets/examples/old/
And will find some.
Carlos
December 20,
Upps sorry, u're refering cellLink with xml
I did not try this, but I think it could be done converting xlm to array with getText(). Just a thought.
thx
Carlos
December 20,
You need two things -

1). link template

obj.setCellTemplate(new AW.Templates.Link, 0);


2). link url

table.getLink = function(col, row){return "#"};


realistically you would store url somewhere inside XML so it will be something like

table.getLink = function(col, row){
    var node = this.getNode(1, row);
    if (node) {
        return AW.ie ? node.text : node.textContent;
    }
};



Alex (ActiveWidgets)
December 20,
Hi Alex,

what if I don't want to use any function in order to set a link, but lust pass data where one the cell contains <a href=.....?
I want to pass data from PHP, so cannot derive easily afterwards whether a cell contains a link or not.

If I pass the value containing the HTML code for <a>, the style of that cell is set al Times New Roman, 14px, black.

.aw-templates-link{color: blue; font-size: 10px; font-family: Verdana;}
.aw-ui-link{color: blue; font-size: 10px; font-family: Verdana;}

but with no success....

What should I do???

Thanks, ciao.

Diabolik
Diabolik
January 23,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.