Adding new rows to data grid disappear with filters

2 Answers 174 Views
DataEntry DataFilter GridView
Mark
Top achievements
Rank 1
Mark asked on 15 Jul 2023, 02:26 PM

I have a customer that when adding new records to my data grid doesn't want the records to disappear until the grid is refreshed.

For example, in the screen shot, the user has filtered the rows to State Program = "AK FFS" and NDC = "42543-003-01".  The user want to see the existing values while creating the new record i.e.,  NDC 42543-003-02.  When the user enters all the fields and the record gets added it disappears because of the current filters applied.  Is there a way to by-pass the filters on the newly added rows?

Appreciate any advise.

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Jul 2023, 12:32 PM

Hello, Mark,

Your question has already been answered in the support ticket you have opened on the same topic. However, I am posting the answer here as well in order the community to benefit from it:

When filtering is applied and the user modifies a certain cell value from the filtered column, this automatically may hide the edited row according to the filter criterion. 

Please have in mind that adding a FilterDescriptor to RadGridView doesn't perform a one time filtering operation. While the FilterDescriptor is present in the grid, it is responsible to keep the rows visible or not according to the filtering condition. Even newly added rows will be hidden if they don't meet the filter requirements. They won't be displayed until the filter is cleared. 

The possible solution for hiding/showing the rows to any certain logic that is different than the default behavior described above is to use the custom filtering functionality that RadGridView offers. Thus, you can implement any rows filtering  logic that fits your needs. A sample approach is demonstrated in the following help article: Custom Filtering.

Off topic, we kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Álvaro
Top achievements
Rank 1
Iron
Iron
answered on 05 Nov 2024, 06:01 PM

I am facing similar problem...

When I have applied a filter and I change a cell value, if the new value does not match with the filter, the row disappears. I understand that.

The problem is that: I have to propagate the value changed event if the cell is filtered or not, but the CellValueChanged event is not tiggrered when the cell value does not match the filter. CellEndEdit is triggered but I can not get the value so it is not solving my problem neither.

How can I get this value changed in order to propagate the new value?

Dinko | Tech Support Engineer
Telerik team
commented on 06 Nov 2024, 10:42 AM

Hi Álvaro,

I have double check the CellValueChanged event and it is triggered when a filter is applied and the new value does not match the filter criteria. You can find my test project attached to my reply. When you run the project, add a filter in the MyString column.

Now remove the "T" letter from the Tools strings. Before that, you can add a break point in the CellValueChanged event handler, if clause. The event handler is hit.

Can you check it out on your side and let me know if I am missing something here to reproduce the reported behavior?

 

 

 

 

Álvaro
Top achievements
Rank 1
Iron
Iron
commented on 06 Nov 2024, 10:45 AM

Hi Dinko, thanks for the reply but my comment is about editing a CellValue instead of a filter.

So you have the filter with 't' (Contains) and now you change the first cell from 'Outdoor' to something that does not match contains filter (ex: 'hi'), when you exit from the edit mode, value changed is not triggered for the cell.

Dinko | Tech Support Engineer
Telerik team
commented on 07 Nov 2024, 12:58 PM

I am still unable to observe the described behavior. I have prepared a GIF file demonstrating the steps performed on my side. Can you check it out and let me know what I am doing wrong:

Tags
DataEntry DataFilter GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Álvaro
Top achievements
Rank 1
Iron
Iron
Share this question
or