NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 15, 2017, 01:23:43 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Music is a higher revelation than all wisdom and philosophy. Complete the mission of life. ..."Beethoven (1770-1827, German composer)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: how to format columns of datatable  (Read 8693 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
on: October 10, 2009, 01:37:14 am » posted from:Steinsel,Luxembourg,Luxembourg

Dear EJS-users,

I have a problem when using a datatable.
It is a datatable with 3 columns.
I want to format the output of all columns on 1 decimal numbers (3.9 for instance).
When I put 0.0 in the ColumnFormat only the first column is formatted in 1 decimal, the other colums still have 3 decimals.
How can I fix this?
Already thanks for any help and advice.
Regards,
Fred
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: October 10, 2009, 08:11:54 am »

Please attach your XML so that other ejs users can immediately understand your question.
I have not tried tables formatting. Smiley
Logged
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
Reply #2 on: October 10, 2009, 08:40:36 pm » posted from:Steinsel,Luxembourg,Luxembourg

I used the DataTable example from the ejs help-pages.
I include the example I use.
Alas I can not manage to format the last column, this one always is 3 decimals.
What to do to format all columns.
I would be grateful for any help or advice.
Regards,
Fred


*** There are 1 more attached files. You need to login to acces it!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: October 11, 2009, 08:32:41 am » posted from:Singapore,,Singapore

i figure out the formatting
column names
new String[]{"#","t","x","C"}
column format
new String[]{"0.0","0.0","0.0","0.0"}

i will add this into the wiki http://www.um.es/fem/EjsWiki/Main/ElementsDataTable

i see u are exploring Ejs, great man, keep it up. Grin

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: October 11, 2009, 08:34:50 am by lookang » Logged
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
Reply #4 on: October 12, 2009, 09:05:20 pm » posted from:Meppel,Drenthe,Netherlands

Dear mr. Lookang,

Thanks for your help. You are fast in finding the solution.
Now I can continue with the applet.
Again many thanks!
Regards,
Fred
Logged
Pages: [1]   Go Up
  Print  
Music is a higher revelation than all wisdom and philosophy. Complete the mission of life. ..."Beethoven (1770-1827, German composer)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Translate Strings into local language format
Mirror sites and different language versions
Fu-Kwun Hwang 5 43758 Last post December 21, 2010, 02:29:02 pm
by georgerobinson
can the interface - field - format show special characters like alpha
Questions related to EJS
lookang 17 18187 Last post December 04, 2008, 05:10:51 pm
by lookang
this is how to make display show in scientific format 0.00E00 like tracker
Questions related to EJS
lookang 2 4464 Last post August 11, 2010, 08:05:48 am
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.062 seconds with 23 queries.since 2011/06/15