Prevent Filtering Edited record in extjs grid - extjs

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?

Related

Get all rows even the filtered rows in gridpanel 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.

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

How to dynamically update summary type for grid in extjs4.1

How to dynamically update summary feature for grid in extjs4.1?
In my application the grid summary will become filled at the time of loading the page, the grid by calculating a total using the summary feature. I have a combo box drop down in the screen. If a user selects from the combo box, I need to update the grid records from store and also need to update the calculated summary value using records coming from another store.
Can anybody tell me how to do that? Thanks
Assuming that yourGridItemId is the first/only grid with this itemId, the following code should work:
Ext.ComponentQuery.query('#yourGridItemId')[0].getView().refresh();

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.

Oracle ADF: How to filter out rows in RichTable?

I have following requirement.
Display data in a table
Clicking on checkbox filter out currently displayed rows by some condition
Clicking on checkbox once again return data appearance to it's previous state
To achieve this I've ovverided method rowQualifies in my ViewObject which is simple SQL based view object to apply my custom filter logic.
When user clicks on checkbox I refresh view object data to apply filter
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It works perfectly, data set updates without interacting with database and my custom filter logic applies as well.
But when I need to cancel filter it wouldn't work because iterator doesn't contain anymore previous rows, and I can only load them from database but it means that I can lose my changes already made to view object rows.
So, when I do
viewObject.setDoFiltering(false);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It will return me those rows that were displayed previous time.
If I do
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
viewObject.executeQuery();
It will return me all rows, but I will lost my changes already made to view object rows.
My questions is how to avoid it? Maybe there is another way of doing this? Maybe it is possible to do something with RichTable to tell it how to filter rows in memory.
Any advices are warmly appricated!
I believe this can be done using ViewCriteria, to filter means to apply a ViewCriteria, and then disable it to view all your data

Resources