PDA

View Full Version : Grid Action prevent editing



oliver.cox
16 May 2012, 5:14 AM
Hi,

I have been having a problem whereby the StopSelection config option on the Ext.grid.column.Action does not prevent entering edit on a row. This only applies when the editor.ClicksToEdit is set to 1.

Am I wrong in assuming that the StopSelection should also prevent entering edit?

Thanks

Oliver

scottmartin
16 May 2012, 7:46 AM
This will not affect the editing. This is related to selecting the record when clicking the icon.

Regards,
Scott.

oliver.cox
17 May 2012, 12:26 AM
Hi Scott,

Thanks for confirming this. Are you aware of any way I can prevent entering edit when clicking an action column?

Thanks

Oliver

sword-it
17 May 2012, 12:31 AM
Hi,

You must see it....
related with as yours thread...

http://www.sencha.com/forum/showthread.php?205627-Row-Editor-doesn-t-hide-fields

oliver.cox
17 May 2012, 1:05 AM
Hi,

Thanks for that, it wasn't quite what I needed though. I need to prevent the row entering edit when the action column is clicked as opposed to prevent the action column displaying when editing.

For now I have a solution that involves add a custom config setting "suspendEditing" which I set to true in the action column handler. A modal form is then opened and when closed "suspendEditing" is set to false. In the beforeedit handler I return !suspendEditing.

I'm not sure this is the best way to handle this as I don't really want to add a custom setting to all my grids. Any ideas as to how I can better achieve this would be appreciated.

Thanks

Oliver