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

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

Related

Ag grid custom pagination option is missing

In the application I have been working need to have a customize pagination option , so that the user can select how many records / page he want to display in the grid. Currently the ag community version has the option to place a dropdown to change the page size dynamically is available. This makes a call to paginationSetPageSize(newPageSize). So do we have any option available to display the custom pagination option along with the autopagination controls coming in the grid footer?. Please help.

Angular ui grid make a non editable row into editable

I am trying to add edit, trash icons to Angular UI grid. On click on a particular row I want to allow the user to only edit the particular row.
Is there any api method available which will make non editable row into editable row on fly? I want to disable the feature of making ui grid editable if user double clicks it as well.
you can refer to the ui-grid 201 Edit Feature
if you want to edit the row, please use the method:cellEditableCondition

Subgrid in ng-grid

I have just started with angularjs. Just wanted to know that if it is possible to create a sub grid inside another ng-grid. There would be some links in a column of the grid and when I click a particular link a grid corresponding to that link should be formed inside the already existing grid.The original grid would be having say 5 columns while the new grid will have say 4 columns. So something on the lines of colspan or something similar is what I look for.
If you are open for writing Angular Directive then you can use any grid ,other than ng-grid which has subgrid feature.
I know like Kendo Grid has subgrid feature and jqgrid has subgrid feature. I wrote a Grid using Google Closure library , this also has subgrid feature.
If I understand your question, you need something like master/details inside grid, it not part of base functionality. nggrid has fixed row height, for virtual scrolling purpose. On our project we have created custom grid plugin base on nggrid
Solution that we used is:
write custom sort function, which populate duplicated rows always below main
when we click expand button we duplicate current row n-times depend on subgrid height
in main row we create css overlay container which hides duplicated rows
load overlay container content via ajax
When we click hide button, we hide overlay, and remove duplicated rows.

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