This is a migrated thread and some comments may be shown as answers.

spawning asynchrounous cell update from cell editor

1 Answer 13 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sprucely
Top achievements
Rank 1
sprucely asked on 14 Aug 2012, 09:31 PM
We have a custom lookup column that performs searches after the user has typed a few characters and paused. It is easy to do this synchronously, since it is simply a matter of overriding GetNewValueFromEditor() and returning the value. Unfortunately this doesn't provide an easy way for us to implement an asynchronous search and update of the cell. We need to allow users to perform a partial edit and then move on to other cells while the asynchronous search/update of the previous cell proceeds.

It's a subclass of GridViewDataColumn, so I have access to BindingTarget and DataMemberBinding. I could spawn from GetNewValueFromEditor() an async delegate that performs the lookup and uses BindingTarget and DataMemberBinding to set the value. Do you see any problems with this approach? Any suggestions on how to better address this?

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 20 Aug 2012, 06:07 AM
Hi,

Sorry for the delay.

Generally there should be no problem with your approach, because this is what GridViewDataColumn actually do in order to update the value. The only problem is that you will by-pass our UI layer validation provided by Cell(Row)ValidatING events, so you should not count on these events any more. Data layer validation (DataAnnotations, IDataErrorInfo and so on) should work as expected.

All the best,
Nedyalko Nikolov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
sprucely
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or