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

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.

Related

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()

ExtJS grid-like custom control

I need to implement grid like control that utilizes some complex custom widgets for viewing and displaying rows. Just like this one:
The key point here is that controls in the right column depend on the value selected in the combobox from the left column.
Does anyone know what is the best way to implement it using ExtJS 5.0 components? Should I create my own widgets to display row data that will serve as both custom renderers and editors?
I would use a beforeedit function which changes the editor of the right column (setEditor) to the required widget type depending on what is set in the left column. If you use Editing (RowEdit) plugin instead of CellEditing, you would also have to setEditor in the left column's change or select event.
This is the easiest way, but it won't show all editors at once, of course.
To have all editors displayed at once, I would make a new field containing multiple fields. You can add multiple instances of these fields to a fieldset, container, panel or form at runtime.

Extjs How to make Grid Column Header Menu options persist in Cookies (Stateful)

Using Sencha Architect Version 3.0.2
ExtJS 4.1
I am trying to make the selections in the Grid column headers stateful and save them in a cookie.
What I am after is the Columns menu that further dropdowns to list the columns in the grid with a Checkbox besides it. Selecting/Un-selecting this box will unhide/hide the respective column.
I want to save this setting so that next time the user loads the grid, a column that is unselected before is hidden and does not appear (until obviously cookies are cleared).
Example Fiddle Located here
Following is the menu I am talking about:
Set stateProvider and make the grid stateful:true with stateId, fiddle here: https://fiddle.sencha.com/#fiddle/a6s

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. :(

ExtJs Combobox with multiple values in one selection

I m new to ExtJs. I was wondering if there's some way wherein i can display multi-line combo-box in ExtJS in a way that for eg : when i select one item, that item may contain 2 values i.e ID and Name., and both the items are considered as one selection, and not with Ctrl+Select way.
Sure there is. Look at the tpl config option of ExtJS ComboBox. You can define a custom template where you may utilize any fields from the Store of the ComboBox as you wish. (See the example included for the tpl config option from ExtJS API documentation that I linked.)

Resources