:: Forum >>

load data from CSV + headings

Great project! Keep up the good work ...

On loading data from a CSV, would be nice if 1st line
could be treated as the heading field, or having a way
to mark a set of entries as heading. Thx
Monday, November 17, 2003
OK, I add this to the requirements list
Alex (ActiveWidgets)
Monday, November 17, 2003
Better yet would be to load the data from an XML fragment & use the tags as the headers.
Friday, November 21, 2003
XML GET and POST asynchronous data requests should be available very soon. It would allow extracting tag names and using them as headers. I'm also thinking of supporting SOAP - if I can find a nice way of avoiding complex manipulation with the message format.
Alex (ActiveWidgets)
Friday, November 21, 2003
When do you expect to have XML support? It says Nov03 but with holidays coming up will you be able to keep that deadline?
Monday, November 24, 2003
I should have something working later this week - which is still November :-)
Alex (ActiveWidgets)
Monday, November 24, 2003
FYI - i was able to get closer to being able to use dynamic (unknown) data, without knowledge of columns... basically, I just make more than I will need, and hide the ones that look empty (based on the first column).

This is NOT bugproofed, nor even well thought out code - just me trying to make it work.

// create ActiveWidgets data model - text-based table
    var table = new Active.Text.Table;
    // provide data URL - plain text comma-separated file
    // start asyncronous data retrieval
    // define column labels
    var columns = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"];
table.getText=function (i, j) {
    if (this._data[i][j]==undefined || this._data[i][j]=="") {
        if (i==0) {
            // first row - no data = hidden row (or any other change)
            return "<style>.active-column-"+j+" { display:none; }</style>";
        return "";
    } else {
        return this._data[i][j];
    // provide column labels
    obj.setColumnProperty("texts", columns);
    // provide external model as a grid data source
    // write grid html to the page

It's still not hiding the column headings... would be nice if it did... if anyone figures this out, let me know : alan_aw@zeroasterisk.com | http://zeroasterisk.com
alan blount : www.zeroasterisk.com
Friday, September 30, 2005

This topic is archived.

Back to support forum

Forum search