PDA

View Full Version : How to remove row from grid if validation fails?



davidsanderson
15 Sep 2010, 10:20 AM
I'm inserting a row into the grid with a button (store.insert). Then I initiate editing, but if the validation fails, the row stays in the grid. I haven't found any events that trigger, either from the grid or store, if the validation fails. So if the validation fails, I want to remove the row. How can I do this? Thanks.

Animal
15 Sep 2010, 10:37 AM
RowEditor events?

davidsanderson
15 Sep 2010, 10:56 AM
How/where do I set up the RowEditor? I can't even find "RowEditor" in the API docs. I also can't find "RowEditor" anywhere in the "EditorGridPanel" in the API docs.

davidsanderson
15 Sep 2010, 11:02 AM
Ah, never mind, it's a plugin. I wish there was an easier way.

Animal
15 Sep 2010, 11:14 AM
It's easy. If they cancel the edit (Because it won't let them commit if any fields are invalid), then remove the record!

davidsanderson
15 Sep 2010, 11:22 AM
THAT part is easy, not the whole setting up a new plugin and using that in the grid and yadda yadda yadda. SO MUCH WORK. :)

Animal
15 Sep 2010, 12:01 PM
No work at all!



...
plugins: myRowEditor,
...