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
beforeDelete() cancel option doesn't work on GUI printer friendly version
next newest post | next oldest post
Author Messages
newToThis
Unregistered
Edit or delete this message Reply w/Quote
Posted Monday, July 25, 2005 @ 17:12:15  

When I return false from beforeDelete() function, the record doesn't get deleted in the database but disappears from the table display anyway (giving the user the impression that it got deleted). How do I fix this? Do I need to call refresh() again and where?
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, July 25, 2005 @ 20:18:37  

Instead of beforeDelete() you should use the onDeleteButtonClick() method in DatabaseChangeListener class.

http://quicktable.org/doc/quick/dbtable/DatabaseChangeListener.html#onDeleteButtonClick()

DWestra
Private

Gender: Unspecified
Location:
Registered: Nov 2005
Status: Offline
Posts: 6

Click here to see the profile for DWestra Send email to DWestra Send private message to DWestra Find more posts by DWestra Edit or delete this message Reply w/Quote
Posted Thursday, November 3, 2005 @ 10:06:45  

Hi,

I have the same problem and tried this solution too. However when i call the delete() method to delete the currently selected row the onDeleteButtonClick() method in my DatabaseChangeListener class doesnt get called.
instead of this the beforeDelete(int row) method gets called.
How can i solve the problem?

Thanks in advance.

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 Wednesday, May 2, 2007 @ 05:32:34  

Did you enable debug? Enable debug and look at debug message.

Are you using the quicktable in readonly mode?

have you provided a delete sql?

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 Thursday, May 17, 2007 @ 06:13:51  

From version 2.0.5.27 following change has been implemented
2) if beforeDelete() method false, then the record should not be deleted. Currently if a database is used, the record is not deleted from database , but still the record is deleted from UI. This is modified such that the record will not be deleted from both database and UI
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