1. Use the code from the incell editing docs (https://docs.telerik.com/blazor-ui/components/grid/editing/incell)and monitor the server console
2. Edit a name (row 3 and onward)
3. Press Enter
I expect OnEdit to fire, but only OnUpdate fires
Hi Wei,
The event sequence is described in the documentation, and is the same between using the keyboard and the mouse: Grid InCell editing - Notes - Evets Sequence.
Using OnEdit to change the grid state is not going to solve the case where you want to pass a custom model instance to the grid. Moreover, OnEdit fires after the grid has tried making a copy of the row model. The event will fire once per row, you can find more details in the article linked above. We cannot guarantee changing the edited item through the grid state in OnEdit will not cause issues, and doing so does not remove the need for a parameterless constructor and will not remove the logic the grid executes.
If you have questions on the timeframes of the items we're working on with you, feel free to post them in any of the private threads you have about them.
Regards,
Marin Bratanov
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.
can you outline the event sequence for mouse and keyboard navigation in InCell Edit mode?
I am asking because this is scoped so we will get it in the end of April - the other one is not scoped yet. and using existing OnEdit event in mouse click, we are able to provide Edit Item into GridState (Yes it is not a full solution in Telerik definition, but in our use cases - where OnRead provide all sort, filter logic ourselves, and no Insert action, it is a valid work arround before the OnModelNeeded event is implemented).
I want to confirm this so we can calibrate when we can plan to release our product before the FULL solution come into place.
Keyboard Navigation is a must have for that release.
thanks
wei
Hello Wei,
As we have discussed a few times in your private ticket, OnEdit is not and will not be the place to change the model instance. OnNeedModel (or however the event gets called) will be the place to provide a custom implementation of the model, for cases when you cannot provide a parameterless constructor. A model instance is also needed for filtering, not only for inserting or editing rows.
This bug will fix the issue where pressing Enter on a row in InCell edit mode opens the next row for editing, but does not fire the OnEdit event for it. The target we have for this fix is the 2.24.0 release, which is the next release after the current one (2.23.0).
This bug, and the enhancement that will let you can provide custom model implementation (rather than the grid automatically creating one for you) are two completely separate tasks and they may not be completed in the same release.
Regards,
Marin Bratanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
hi, this request and OnViewModelNeeded request are both raised by us trying to solve the providing EditItem not using parameterless constructor in InCell edit mode (and we have no insert use case and use OnRead to provide all sort, filter, load logic, so there will be no other cases telerik grid need a new viewmodel).
can you clarify this OnEdit which is scoped for 2.24. will it fire in Keyboard navigation on entering a new row, and will it not call parameterless constructor for the new viewmodel before this event, will take what is provided in this event (using gridState.EditItem)?
thanks
wei