I would like to program in Sencha architect a button that can save inputs from a textfield into a grid and a cancel button that close the window.
-
3This is not a code-writing service. You will need to post your attempt and any issues you are facing. – Mr. Polywhirl Sep 24 '20 at 13:30
-
1i dont want a code. My goal was to get approach and not the code. cmg helped me a lot without giving me a code ^^ – PolizeiUwe Sep 25 '20 at 11:15
-
Sencha Architect let's you specify an action (handler) for a button. This needs coding!!! As en example for the cancel button: `this.up('window').destroy()`. As soon as you need logic, you - most likely - will need coding. – Dinkheller Oct 06 '20 at 20:00
1 Answers
I don't use Sencha Architect, but generally speaking using extjs you would use two way binding and a store.
You would bind your text field to a record in your store. The store is the store for the grid. Any change to your text field would change in the grid as well as they are bound to the same record in your viewModel.
There are some very good examples of data binding on https://examples.sencha.com
https://examples.sencha.com/extjs/7.3.0/examples/kitchensink/?modern#data-binding https://examples.sencha.com/extjs/7.3.0/examples/classic/grid/binding.html
This is also a good read: https://docs.sencha.com/extjs/7.3.0/guides/application_architecture/view_models_data_binding.html
If you plan to use extjs understanding the viewModel and controller is well worth your time.

- 678
- 1
- 4
- 9
-
Happy to help. Spending time with the Sencha how-to's and users guides really pays off. – mcg1103 Sep 25 '20 at 16:08