Ext JS 5 Data Binding Combobox - extjs

I have an Ext JS 5.0.1 application that I am working on. I have a simple window with a grid and a form. I have the grid bound to my store and when a row is selected, all the textfields in the form bind, but I also have a combobox with its own store. When I select the grid row, I could not get the combobox to bind. I finally figured that out, but now if you change the combobox on the form the grid column just shows object.object. I have created a fiddle if anybody can help me out a little with this problem. Obviously I am trying to use the MVVM but also I would like for it to work in Architect if possible.
Fiddle

Bind value, not selection:
value: '{allPeople.selection.gender}'
Working example: https://fiddle.sencha.com/#fiddle/obm

Related

Hide and show textbox when a particular option is selected in ext js

I have to include a checkbox in my code where when someone select on mail, I can give/show options for "To", "CC" and "BCC". When person doesn't select checkbox I want these textbox to be hidden in ext js.
In that case I'd recommend two way binding.
You use a viewmodel to bind the checkbox value and then use that value to bind a hidden state onto your "mail" textfields.
Here is a very broadly made working sencha fiddle example
Alternatively to #KaMun's solution, you can use a FieldSet with checkboxToggle set to true: https://docs.sencha.com/extjs/6.7.0/classic/Ext.form.FieldSet.html

How can i auto update a Kendo Grid?

I have a Kendo Grid which I have bound a datasource in AngularJS. It has 10 rows.
In the MVC controller that is called I do some calculations and refetch the new datasource associated with that Grid and 5 of the lines no longer need to be on the grid.
The issue is that the rows are deleted from my model and database but I need to close my screen and come back to the Kendo Grid to see the change.
Is there a way I can make the grid update with that new data , so of like an Autorefresh ?
Thanks
yep all sorted. using grid.datasource.read()

How to get the dataItem of edited cell in kendo grid

My problem is how I can get the dataItem(row) where a cell was updated.
The column is a dropdown menu.
It seems dataBind is not functioning well.
I am using kendo grid and angularjs in this project.
Here is a sample demo.
Try using change event of grid dataSource there you can get the current modified dataItem with updated data
change:function(event) {
}
In the above code event will be having the updated dataItem

How to dehighlight the row when checkbox is checked in extjs grid

I am using extjs4.1 grid in aspnet mvc3 application.
I have used checkboxrowselection model.
the issue is :
once the checkbox is checked,the row should not get highlighted in the extjs grid.
How can i acheive this.
please help
The purpose of the checkbox selection model is to select rows. In extjs, selecting a row means to specifically highlight it, what you want is just a logical selection. You should be using the user extension: Ext.ux.CheckColumn that ships with the core library.
To gather the rows, you would need to do a query on the store where the models property is set to true for the data index you define on the checkcolumn.

How to update a Ext JS 4 grid when popup form is submitted

Please point me to an Ext JS 4 code sample of a grid with records editable via a popup form. It seems to be a common use case, but I can only find editable grids with editing in place.
My approach:
Each row in the grid has an Edit button, which shows Ext.window.Window with an item Ext.form.Panel.
When the form is submitted I have all the fields, which correspond to a record in the grid store.
I get record using:
var storeRecord = grid.getStore().getAt(index);
But when I modify properties of this record, and hide the form window, the grid does not show updated values.
Am I missing some step? Do I need to force refresh? Or maybe there is a standard way to configure the grid with an editor as a form panel?
After two days of searches, trials and errors, I found the solution:
grid.getView().refresh();
I wish there was a faster way for Ext learning curve. :(

Resources