PDA

View Full Version : Ext js 4.2.2 - validation support for cellEditing



hchhabra27
20 Aug 2014, 9:59 AM
I am using cellEditing plugin to edit a particular cell in a grid. This serves my requirements really well from the UI point of view.
However, I want to add validations to the cell and prevent user from completing the edit event unless the value entered is valid. I am trying to achieve this through:

editor: {
allowBlank: false,
vtype:<customized vtype>
}

I am also implementing edit & beforeedit callback events. The error message & tooltip are shown correctly but even with an invalid value, you can still press enter and the callback method 'canceledit' is invoked.
I do not want the edit event to be completed/canceled unless the value entered is valid.

However, if I use RowEditing plugin, the validation works as expected and edit event is not completed until the value entered is valid. This is what I need but the look and feel of cellEditing instead of RowEditing plugin more closely matches my requirements.

Is there a way I can have similar validation behavior in cellEditing?

Scott-1
21 Aug 2014, 9:01 AM
row editing and cell editing both have a validateedit function.