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

How do I ensure data source has completed read before use

1 Answer 77 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 07 May 2012, 09:45 PM
I have a grid that has a column that relies on a lookup from another data source for the column text given the ID value. The same lookup is used by a custom popup editor and works fine. The script issues a read in the data source at the start and then the grid gets initialized after the document is ready. The lookup fails because the data source has zero records. The lookup source has to retrieve over 400 items so I assume the problem is that the grid is trying the lookup before the data source has completed the read. Is there some means of ensuring the data source has completed the read? Or is my assumption incorrect and something else is happening here?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 08 May 2012, 03:28 PM
Hi Richard,

I suggest to hook up to the change event of the dataSource. It will fire every time when the data is changed (fetched from the server, filtered, sorted, etc).

For more information on this subject you may check the discussion from this forum thread.
I hope this helps.

Greetings,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Richard
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or