DropDownList bind-Value with OnRead data load does not bind value selected from code

1 Answer 70 Views
DropDownList Grid
Claudio
Top achievements
Rank 2
Bronze
Iron
Iron
Claudio asked on 28 Apr 2022, 12:44 PM

I have a TelerikGrid with inline edit and a GridColumn EditorTemplate with a DropDownList loaded with OnRead and binded to the grid row.

Now if the ReadCombo method handle read quickly the DropDownList selected item is binded correcty, but if it take some time (4, 5 seconds..) it not bind, this occurs because bind-Value evaluate before ReadCombo populate the DropDownList.

If i use the Data property to populate the DropDownList binding work fine, but i need to use OnRead callback to manage pagination, filters ecc..

Here a simple sample to reply the issue: https://blazorrepl.telerik.com/mQaymWlm40ccwDCE40

if you comment the line await Task.Delay(10000); all work fine.

There is a solution for this problem?

Thanks


Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 28 Apr 2022, 01:00 PM

We have a similar scenario.  We bring the control up with Enabled=false until the OnRead is complete, then we set Enabled=true
Claudio
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 28 Apr 2022, 02:00 PM

How can you find when read is completed? Disable / Enable the combo during OnRead does not re-evaluate binding
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 28 Apr 2022, 04:24 PM

By implementing an EventHandler for the OnRead event.  You get your data, then "Enabled=true".  You *may* need to call StateHasChanged after that.
Claudio
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 02 May 2022, 08:11 AM

I tried enable the dropdown when OnRead completed as you can see in this sample: https://blazorrepl.telerik.com/wwazaQaC08YwoBaG28

but it not solve the issue, i think enable the component only when data are ready does not throw binding update.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 03 May 2022, 08:05 AM

Hi Claudio, Timothy,

This issue will be resolved in version 3.3.0, due in mid-May. Here is another related public item, which deals with clearing the DropDownList value.

Regards,
Dimo
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/.

Tags
DropDownList Grid
Asked by
Claudio
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Dimo
Telerik team
Share this question
or