Get all rows even the filtered rows in gridpanel extjs - extjs

I have the gridpanel in extjs with filter in the header so the end-users can make the filter, updating row and then make another filter and continue updating row ...
After finishing updating the rows, the user will click on save button and send all the data to server for updating, but i can only get the visible row in gridpanel.
Could sombody show me how can i get all the updated rows (which is hidden by filter) in gridpanel using extjs?
Thanks in advance.

After checking the api document from Ext JS, I can retrieve all records including the filtered out one using getDataSource function.

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

Prevent Filtering Edited record in extjs grid

I have extjs grid with cellediting, i have configured default filter on grid.
if user edits some records, i dont want that record getting filtered out(though they are part of filter criteria).
If user edits a records it becomes dirty, if record becomes dirty prevent filter being fired.
Especially i am using treegrid.
Can anyone help me?

Filters are not getting reset after loading new data to grid based on selected date

I'm using the date field as a selection criteria for populating the grid.
I want to reset the previously applied filters once the new data is about to be loaded in grid.
However, the filters are not getting removed and the menu icon for filter is showing additional values under select boxes which is very confusing in case the grid has less number of rows. I'm using this in my angularjs website.
Please assist me in getting this resolved.
I've already opened the issue in github also. Below is the link:
https://github.com/ceolter/ag-grid/issues/606

ExtJS 2.x Grid Cell Validation for Duplicate Data

I have ExtJS Grid In which I have Columns called "Mobile Number".
I have made simple thing here When I edit more than 2 rows and If I Modify the Column "Mobile Number" It will be checked whether is it Exist in Grid or Not.
If Duplicate Number found, I will give Message that the Input Mobile Number is already Exist and
reloading the whole grid so all edited data will be gone.
But, I want the non-duplicate data back was edited.
So, How can I keep my non-duplicate data as it is after reload the whole Grid.
I just want to remove duplicate row where found duplication and other edited rows keep as it is.
Can I use this RowEditor plugin for ExtJS 2.x compatible.
http://dev.sencha.com/deploy/ext-3.4.0/examples/grid/row-editor.html
My E-mail: ashwin.parmar2020#gmail.com
To find duplicate data use afteredit event of Ext.grid.EditorGridPanel on that event you will get current record, so just display message and add empty value in that field
You should use a validator for the mobile number field that detects duplicates and refuse the duplicate number. So you don't have to reload the grid.
If you want to reload the grid anyways, you could get the dirty rows before doing so and store/reapply them afterwards.
To get the dirty records you can use the getModifiedRecords() function of the grids store. Use the commitChangesfunction of the store to apply them after validation/processing.

newly added rows cannot be drag dropped in extjs gridpanel

I have a problem with extjs gridpanel dragdrop.
the scenario is as follows:
The gridpanel is initially rendered by loading a remote store.
Then, the rows are added, updated dynamically.
Drag drop feature is implemented on "render" event of gridpanel.
Drag drop works fine for the originally retrieved rows from the remote store.
but when i try to use drag drop for the newly added or edited rows, it doesn't work.
I am getting the following error on firebug:
Index or size is negative or greater than the allowed amount" code: "1
This is may be because , the newly added rows are not taken as a part of the store . I tried changing the event to "click" but it doesnt work that way..
Please please suggest a solution for this fast.. Its needed urgently.
Thanks,
Shreya.
I know 2 methods for drag and drop in ext, one of them is only for grid rows, the other one that I'm using is with setting dragzones and dropzones. With that method, the only thing you have to do is catch an event which is fired when you add new rows to the grid. In that event, set every new row to be a dragzone (so it can be dragged). That's what I did in a similar situation. Hope this helps..
By the way grid rows don't have a .el (DOM element attached to the Ext component, which is the row in this case). So you'll have to create a div for each row component and then use the initializeDropZone(row[x]), where row[x] is the new added row.

Resources