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 > General QuickTable Support/Help Post New Topic   Post A Reply
How To Add A Totals Row To DBTable? printer friendly version
next newest post | next oldest post
Author Messages
SamB
Unregistered
Edit or delete this message Reply w/Quote
Posted Friday, September 9, 2005 @ 15:01:28  

On a standard DBtable, which uses createColumnModelFromQuery to show its data, how would I go about adding a uniquely colored totals row at the end? Im new to quicktable, so I aoplogize if I missed something obvious in the documentation.
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 Saturday, September 10, 2005 @ 22:37:04  

QuickTable doesn't have the summation feature.

There is an ugly workwround to acheive this, which I hate to suggest. Add an empty row and setvalue with the sum value. The color of this row can be modified using cellPropertiesModel.getBackground(int row, int col) . when user updates cell, listen for cell value changes using DBTableCellListener.cellValueChanged(int row, int col, java.lang.Object oldValue, java.lang.Object newValue) and update the total value for the column into the sum row. You can make the sum row non editable using CellPropertiesModel.getCellEditable(int row, int col) method.

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