craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Pre-Download Questions Post New Topic   Post A Reply
Using QuickTable without database printer friendly version
next newest post | next oldest post
Author Messages
khailv
Unregistered
Edit or delete this message Reply w/Quote
Posted Monday, April 5, 2004 @ 05:31:20  

Can I load data (array form) to QuickTable without using Database?
Please give me an example code please!

Thanks

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, April 5, 2004 @ 11:48:49  

Its very simple to load an array

DBTable dBTable1 = new DBTable();
String[][] myArray = { {"A", "B"}, {"C", "D"}};
dBTable1.refresh(myArray);

After loading, optionally you can set column properties as below

Column c = dBTable1.getColumn(0);
c.setReadOnly(true);
c.setType(Types.NUMERIC);
c.setPrecision(7);
//we want the column header of this column to be "Order No". In this header we want the
//"Order" to be in first line & "No." to be in second line. To get this we have to separate
//the Order & No. by a newline character
c.setHeaderValue("Order\nNo.");
//we want the display width of the column to be 60 (this is not the maximum data length)
c.setPreferredWidth(60);

khailv
Private

Gender: Unspecified
Location:
Registered: Apr 2004
Status: Offline
Posts: 3

Click here to see the profile for khailv Send email to khailv Send private message to khailv Find more posts by khailv Edit or delete this message Reply w/Quote
Posted Monday, April 5, 2004 @ 19:03:21  

Many thanks, admin
Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios