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 > Events/Actions Post New Topic   Post A Reply
Event after cells change printer friendly version
next newest post | next oldest post
Author Messages
converge
Corporal

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

Click here to see the profile for converge Send email to converge Send private message to converge Find more posts by converge Edit or delete this message Reply w/Quote
Posted Monday, March 3, 2008 @ 10:23:25  

Is there an event that is fired after a cell value is changed and after the table is updated? I'm using a DBTableCellListener, however this is not working for me because when this event is fired the table has not been updated yet.
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, March 3, 2008 @ 22:29:28  

May be there is another solution for your issue. what are you trying to do, I can give a better solution.
converge
Corporal

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

Click here to see the profile for converge Send email to converge Send private message to converge Find more posts by converge Edit or delete this message Reply w/Quote
Posted Tuesday, March 4, 2008 @ 08:22:30  

I have a graph object that represents the data in a quicktable. Whenever a value in the table is modified by the user, I want to signal to the graph so it can update itself. However, when I signal to the graph using DBTableCellListener.cellValueChanged(), the table hasn't been updated yet.
lhyna
Private

Gender: Female
Location: Colombia
Registered: Feb 2008
Status: Offline
Posts: 7

Click here to see the profile for lhyna Send email to lhyna Send private message to lhyna Find more posts by lhyna Edit or delete this message Reply w/Quote
Posted Wednesday, March 5, 2008 @ 09:31:02  

you can implement a cellListener and in the event of cellValueChanged do your own behavior, 4 example I implemented the class MyCellListener that has a quicktable to get other data that i need to do the update of the info, u can pass ur graph object as well. i included the code of myCellListener as an example. good luck javascript:enter_code(':\)');
javascript:enter_code(':\)');

class MyCellListener implements DBTableCellListener {

private quick.dbtable.DBTable tbl;
private UWListRW update;

public MyCellListener(quick.dbtable.DBTable tbla, UWListRW upd) {
super();
this.tbl = tbla;
this.update = upd;
}

public Object cellValueChanged(int row, int col, Object oldValue, Object newValue) {
if (col == 1) {
if (!this.tbl.getValueAt(row, 0).equals(newValue)) {
Object[] data = new Object[2];
data[0] = this.tbl.getValueAt(row, 1);
data[1] = newValue;
this.update.commit(data);
}
return newValue;
}
return oldValue;
}
} :) :)

--------------------
Lhyna

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