Declined
Last Updated: 25 Sep 2024 10:33 by ADMIN
Markus
Created on: 15 May 2023 11:43
Category: Grid
Type: Bug Report
0
Cell currently being edited is overridden by delayed events

Grid with columns price1 and price2. Enter value in price1, switch to price2, enter value there, and editor is set to old value after async events finish.

The value entered in price2 is correctly set to the property, but the editor reverts to the previous value. If you escape edit mode of the cell, the value entered before the events finish will be shown.

On (fast) tabbing and entering values, this removes the first values entered before the async background events finish.

I tried reproducing the problem in REPL, but could not get the exact same behaviour. In our case no specific value is being set to price2, it just reverts.

https://blazorrepl.telerik.com/cxEzvQvE52q8aaAi27

 

How would you approach preventing the editor from being overridden by other cells' delayed events?

2 comments
ADMIN
Dimo
Posted on: 25 Sep 2024 10:33

Hello Markus,

We are closing this public item due to lack of enough information and inactivity. If we receive the requested details, we can reopen the request.

Regards,


Dimo
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.

ADMIN
Nadezhda Tacheva
Posted on: 22 May 2023 09:37

Hi Markus,

I find the following statement a bit confusing and it will be useful if you can elaborate more as a start:

> "If you escape edit mode of the cell, the value entered before the events finish will be shown."

In the sample you've shared, it looks like you haven't enabled any of the Grid's built-in edit modes and instead, you are rendering NumericTextBoxes inside the templates of the Grid cells. In this scenario, the inputs are always visible and the cells are always in "edit" mode. In addition, the behavior is not related to the built-in editing of the Grid but to a custom scenario that should be handled by the application.

Having this in mind, can you confirm if you do not experience this behavior with the built-in Grid editing?

If the issue explicitly targets the custom scenario you've shared, I would recommend revising the code in the OnChange handler of the NumericTextBoxes.

I lack all the details for the case but I imagine you may need to handle this event in order to update the values in the actual data source and this is performed asynchronously.

To do so, you just need to get the value the user typed and send it to the service that updates your database. In the current example, I see you are programmatically setting the Price2 value in the OnUpdatePricesAsync which effectively changes it. This operation is not needed as the viewport already displays the correct value updated by the user.

Regards,
Nadezhda Tacheva
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!