Hi,
wonder if it's possible to filter iggrid on some column value and then when user edits this value on one row, keep this row with original filter result. Currently when row value on which filter is applied is changed, this row disappears from grid as it no longer fit the filter condition.
thanks
Hi Ronny,
The behavior that I see in the igGrid is the following: once you edit the value of a column with applied filtering so that the new value doesn’t match the filter criteria anymore, it would not disappear instantly, even with autoCommit set to true. You may take a look at it here: https://jsfiddle.net/pym5gq9k/
The reason for that behavior is because the filtering is not getting applied instantly when you stop editing. Once you reapply the filtering condition again, the modified record is going to disappear from the result of the old search criteria, since its data is already. Even though, in case you have applied filtering somewhere else, the result of the filtering might seem to be disappearing instantly. But the default filtering behavior is as in the jsFiddle above.
If I seem to be misunderstanding your problem again, please send me a step-by-step description of your issue, accompanied with a sample. I’d like to help you fixing it.
Best wishes, Petko
looks like we don't understand each other...
Hello Ronny,
I see, you want to add a new record in the DOM and not modifying the grid’s data. In our framework, there’s a method that allows you to only render a new row. Be advised, that ever since its data is not included in the grid’s data, it may disappear on data operations, so you might need to store the records that are only rendered without being persisted in the actual data in a different structure.
Hope it helps.
Regards, Petko
Thanks Petko,
but I don't want to add new row because it will be treated as new data to grid ending with edit mode.
I need add existing row which was changed that way it's not complying to filter anymore so normally would be hidden.
Any suggestion how to takle this?
What you want is not supported as an out-of-box functionality. Even though, that behavior is possible to be achieved, but you would need to handle what happens after the row editing by yourself.
I am going to suggest you to bind on the editRowEnded event. As an argument of that event, you will receive the old row data.
There, you can check whether there are any filtering expressions applied. After you have verified that the modifications comply with your requirements for adding a new row, you can add the new row to the grid via the addRow method.
In this way, you could handle what would happen when a modification of a filtered record occurs.
If you need any further assistance with that matter, feel free to contact me.
Best regards, Petko Bozhinov,Infragistics, Inc.