Read file, populate grid

Develop and Deploy Cross-Browser Web Apps .

Read file, populate grid

Postby joedarock » Fri May 20, 2016 6:40 pm

I need to read a server file that has CSV records and put those entries into a grid for viewing. What are the recommended methods to read file data from the server and which GUI widget is best to display it? Is there an example somewhere?

Joe
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Read file, populate grid

Postby support » Mon May 23, 2016 2:20 am

You can se xui.getFileSync to read file,and use xui.UI.TreeGrid to show it.
Of course, you have to adjust data before you set the csv data into treegrid.
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Read file, populate grid

Postby joedarock » Mon May 23, 2016 11:39 am

I searched the API for getFileSync and I can't find any documentation on it. Can you provide a link to docs as well as an example?
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Read file, populate grid

Postby support » Tue May 24, 2016 2:24 am

somthing like this:


xui.getFileAsync("http://xxxxx/asdf.csc", "text", function(result){
alert(result);
}, function(msg){
alert('error:'+msg);
});
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Read file, populate grid

Postby joedarock » Tue May 24, 2016 2:07 pm

Thanks. That worked.
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron