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

Datasource dropdownbox issue

2 Answers 13 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 09 Apr 2014, 10:16 AM
I am putting this thread here because the issue is in the datasource and not in the dropdownbox.

I have a screen with a dropdownbox and a grid.  The grid has data passed to it in the model and creates a datasource to load those values.  The dropdownbox uses a URL to call the controller to retrieve values remotely.  When the screen is loaded, the items in the list all have the correct description (the relevant text and id options are set on the drop down), but the selected item just reads '[object object]'.

This is where it gets odd.  If I remove the grid and change nothing else, the drop down works correctly.  All options being passed into the drop down and the datasource are identical in every way in both situations.

I have switched to the non minified script and stepped through.  When I have the grid I reach L105 of kendo.data.js (wrapAll) and:

target[0] instanceof ObservableObject returns true, but

target[0] instanceof kendo.data.ObservableObject returns false.

ObservableObject and kendo.data.ObservableObject are references to the exact same definition, so how is this even possible?  This false result then causes the drop down box code to display the selected item the way it does.

I have been unable to replicate this issue in the Kendo dojo so I realise it will probably be hard for you to offer any help, but can you think of anything which might cause this?

All parameters are identical, the grid on the screen is the only difference.  It still happens if I remove the datasource from the grid so it's not even two datasources clashing.

I will continue trying to recreate this outside of my system (its a complex project so I cannot post it as an example).

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 11 Apr 2014, 08:09 AM
Hello Karl,

Sadly we cannot say what might be behind this and indeed we will need a replication to investigate on.

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Karl
Top achievements
Rank 1
answered on 11 Apr 2014, 08:13 AM
I thought this might be the case.

I have investigated further and it appears to be an issue with Dojo/RequireJS and loading multiple typescript files which are requiring the same Kendo JavaScript files.

Thanks.
Tags
Data Source
Asked by
Karl
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Karl
Top achievements
Rank 1
Share this question
or