Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: master detail interactions
GridCtrl: master detail interactions [message #34423] Mon, 21 November 2011 14:17 Go to next message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I have two tables master and detail. I have a button for each table that perform an Add row.
These buttons act independently of each other. It happens that I can add a row in Detail table even when the Master table record is being edited/inserted but not yet accepted.
When the Master table is being edited I would like to prevent any other action. In fact, make no sense to create a detail row if the ID of the master row is not yet created... and sometimes happen weird things with lost of data.
Is there preferred way to force the user to finish the editing of the master row before he can do some other task?
Perhaps I need to disable the controls related to the details table while working on the master one. Is there some specific way that can be achieved via 'When...' ?

Thanks,
Luigi
Re: GridCtrl: master detail interactions [message #34437 is a reply to message #34423] Tue, 22 November 2011 17:11 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
forlano wrote on Mon, 21 November 2011 14:17


Is there preferred way to force the user to finish the editing of the master row before he can do some other task?
Perhaps I need to disable the controls related to the details table while working on the master one. Is there some specific way that can be achieved via 'When...' ?



I have disabled the detail grid when the master table is being edited (WhenStartEdit). Then enabled it when the editing process is finished (WhenEditEnd). All the actions on the detail table can be done via a context menu. So the two tables cannot disturb each other. It seems to work ...

Luigi
Re: GridCtrl: master detail interactions [message #34441 is a reply to message #34437] Tue, 22 November 2011 18:19 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

forlano wrote on Tue, 22 November 2011 11:11

forlano wrote on Mon, 21 November 2011 14:17


Is there preferred way to force the user to finish the editing of the master row before he can do some other task?
Perhaps I need to disable the controls related to the details table while working on the master one. Is there some specific way that can be achieved via 'When...' ?



I have disabled the detail grid when the master table is being edited (WhenStartEdit). Then enabled it when the editing process is finished (WhenEditEnd). All the actions on the detail table can be done via a context menu. So the two tables cannot disturb each other. It seems to work ...

Luigi

You were faster Smile I almost finished adding master-detail example to GridCtrlTest that includes your problem.
Re: GridCtrl: master detail interactions [message #34442 is a reply to message #34441] Tue, 22 November 2011 18:37 Go to previous message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
unodgs wrote on Tue, 22 November 2011 18:19

forlano wrote on Tue, 22 November 2011 11:11

forlano wrote on Mon, 21 November 2011 14:17


Is there preferred way to force the user to finish the editing of the master row before he can do some other task?
Perhaps I need to disable the controls related to the details table while working on the master one. Is there some specific way that can be achieved via 'When...' ?



I have disabled the detail grid when the master table is being edited (WhenStartEdit). Then enabled it when the editing process is finished (WhenEditEnd). All the actions on the detail table can be done via a context menu. So the two tables cannot disturb each other. It seems to work ...

Luigi

You were faster Smile I almost finished adding master-detail example to GridCtrlTest that includes your problem.


Very good!
I will learn something new by sure.
Thank you Smile

Luigi
Previous Topic: How to set the color of a row
Next Topic: Is this a bug?
Goto Forum:
  


Current Time: Sun Sep 22 08:10:54 CEST 2019

Total time taken to generate the page: 0.01011 seconds