disable record selection in edit mode?

I am studying the servoy example crm. The navigation panel on the left has a customer list. clicking on the customer name in that list navigates to that customer record. I would like to disable this only during record edits. I have tried something like forms.Names.controller.enabled = false; but that locked up my test file. also elements.tabs_460.enabled = false; did not work. this is the enclosing tab panel. I also played around with if(!globals.isEditing()) but that got me nowhere. Can this be done? When editing any table the selection of another record or table will still work and I think this could be confusing to users. When the color of the fields changes to indicate edit mode I want to prevent the user from leaving that record.

On another note, the example crm does not seem to use radio buttons? What is the best way to get the radio buttons to work like the fields/combo boxes in the example? The regular fields change color to indicate they are editable, what is the correct way to handle radio buttons in this case?

Thanks
Charles

Hi,

charles huff:
I am studying the servoy example crm. The navigation panel on the left has a customer list. clicking on the customer name in that list navigates to that customer record. I would like to disable this only during record edits. I have tried something like forms.Names.controller.enabled = false; but that locked up my test file. also elements.tabs_460.enabled = false; did not work. this is the enclosing tab panel. I also played around with if(!globals.isEditing()) but that got me nowhere. Can this be done? When editing any table the selection of another record or table will still work and I think this could be confusing to users. When the color of the fields changes to indicate edit mode I want to prevent the user from leaving that record.

I had the same issue, using the Servoy 3 Sample CRM.
You just need to put this into the ‘doEdit’ method on each form you want to protect

//doEdit();

// disable solution navigation
forms.lst_solution_navigation.controller.enabled = false ;

On another note, the example crm does not seem to use radio buttons? What is the best way to get the radio buttons to work like the fields/combo boxes in the example? The regular fields change color to indicate they are editable, what is the correct way to handle radio buttons in this case?

Thanks
Charles

I didn’t have a problem with radio buttons. If you place them on a layout and prefix their names [name property] with ‘fld_’, they change colour like everything else. You have to do this for any element you want to be editable (including tab panels, portals etc.)

Hope that helps,

Rafi

Thanks very much that did the trick. I also used forms.lst_tsNames.controller.enabled = true ;
in the save and cancel button methods… now to try out changing rb_ to fld_

Thanks again.

Charles