Disclaimer: this is my first extJs app, being built with Architect 3. Remarkably easy so far! In just a few hours I have a fully functional file maintenance application. I am very impressed with the platform so far.
I decided it would be nice to add a context menu to the grid, so delete & copy record functions could be done directly in the grid instead of opening the Edit window and pressing the button there. I can get the context menu to popup exactly where it needs to, but I cannot get any of the tricks I have found online to work when trying to get the currently selected record.
I was thinking it may be an issue of scope, but not sure. Under Views I have my main form, an edit form, and a view with the context menu. Maybe there is some trick I need to use the access the grid in the main form from the context menu view? I have tried fully qualifying the grid (application.view.gridform) and that part seems to be ok, but if I try to append GetSelectionModel().GetLastSelected() it always says that GetSelectionModel() is not defined. The docs say that GetSelectionModel() should be valid, but not working. I have also tried specifying the Grid View instead of the Grid panel, but that does not work either.
Am I missing something obvious? Not sure if it matters, but all of the event code is contained as actions in a single controller module.
I will keep plugging away too...
Thanks!
Dave
Aucun commentaire:
Enregistrer un commentaire