As I've been learning about the grid, I've noticed in most of your examples, the grid is being call from a jquery ready function. Can you explain this technique, or probably better, point me to documentation that explains this to me.
3 Answers, 1 is accepted
0
Nikolay
Telerik team
answered on 05 Sep 2019, 02:48 PM
Hi Guy,
Initializing the Grid inside the $(document ).ready() method will start once the page DOM is ready to execute JavaScript code. This ensures that the DOM will not be manipulated before the document has been loaded. Because initializing the Grid occurs after the document is ready, $(document).ready() is a good place to have all other jQuery events and functions.
As a page can't be manipulated safely until the document is "ready", you wait until the document ready event has fired. The document ready event signals that the DOM of the page is now ready, so you can manipulate it without worrying that parts of the DOM has not yet been created.
Hope this answers your questions and please contact us back if you have any further ones.
Regards,
Nikolay
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
So the main idea being the grid does not get initilized until the DOM is loaded.
0
Nikolay
Telerik team
answered on 09 Sep 2019, 01:46 PM
Hi Guy,
Indeed, that is correct. The $(document ).ready() method ensures that the Grid is not initialized before the DOM is loaded. This allows you to generate the Grid without worrying that parts of the DOM have not yet been created.
Please do not hesitate to contact us back, if you have other questions.
Nikolay
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.