3.2.0

how to populate a single GRID from multiple CSV data files

hi everyone!

i need to read the data from multiple CSV data files and display them in a single GRID.

is there anyway of doing it?

thanks in advance

scropionking
scropionking
July 21,
Ya know ... I've wondered the same this about using multiple XML sources and loading them all into 1 grid.

I did find a way, but it is a little annoying.

I load a dataset into a HIDDEN table. Then, I copy those table rows into a VISIBLE table.

Then I load the next dataset into the HIDDEN table (effectively overwriting the first set of data. Then I copy thsoe new rows into my VISIBLE grid.

And I repeat the process until all my datasets have been loaded.

It's tedious, but it does the trick ... at least until AW supports it directly. It should work for CSV files as well as XML.

Hope this concept helps you.
Carl
August 11,
Erf, seriously guys, it's as easy as picking your nose.

This is the code you use to call your initial data and load into the grid:
var table = new AW.CSV.Table;
table.setURL('companies2.csv');

table.request();
obj.setCellModel(table);


Now, lets say you want to click on a menu and load a different set of data in the same grid:

<a href="changeData('companies.csv')">Click Me</a>


changeData would have the following:
function changeData(url){
var table = new AW.CSV.Table;
table.setURL(url);

table.request();
obj.setCellModel(table);
}


No need to load 50 billion kinds of data into hidden tables and mix matching with visibile ones and writing 846 extra lines of code. a Simple request to the new data source and a setCellModel would do the trick.
AcidRaZor
August 12,
Oh, I misread Carl's explanation. Seems we have two different takes on the question. Hopefully he will find a solution that suits him in one
AcidRaZor
August 12,
Depending on which programming language (server side) you guys are using, you might want to have an ASP (or PHP, whatever floats your boat) combine all these results into one and then push it back to the grid. Much cleaner solution IMO
AcidRaZor
August 12,

This topic is archived.

See also:


Back to support forum