Kendo UI + MVVM best practics

6 posts, 0 answers
  1. Leszek
    Leszek avatar
    17 posts
    Member since:
    Sep 2009

    Posted 02 Dec 2013 Link to this post

    Hello,
    I have simple scenario
    kendo grd with data from MVVM (kendo observable array iser list) and 2 kendo windows - in 1 I'm editing details, second editing another data. Both related to grid UserId. When I click on edit in grid row user edit window is displaying. Similar to another window for displaying user orders.
    Could you please advise me how should I organise it.
    So far i'm doing it on 1 view. 3 kendo view models, each related to diferent DOM object (divGrid, divEditDetais, divDisplayOrders).
    Then I could refresh grid when I have finished editing user details.
    but if I want edit edit more details for grid - lets say 5 diferent things in 5 diferent kendo window - it is dificoult to manage in 1 java script file and 1 view.
    How I should to do? can I use partial view? But how refersh mvvm on main view without reload?
    Please advise.
    Regards
    Leszek
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 04 Dec 2013 Link to this post

    Hello,

    The standard support services - the ones included in the support package that goes with the controls, cover only the built-in functionality of the corresponding products. In case you need consultancy, best-practices advice or general assistance that is not directly related to the functionality of the KendoUI control that you are using, I would suggest to check our Professional Services

    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!
  3. Leszek
    Leszek avatar
    17 posts
    Member since:
    Sep 2009

    Posted 04 Dec 2013 Link to this post

    Hi,
    it is probably my misunderstanding of this forum idea. I did not created support ticket, just ask question on the forum. I've thought that it is right place for asking about best practices. It is how forums usually working.
    I will try on different forum.
    Thanks.
    Leszek
  4. Terence
    Terence avatar
    7 posts
    Member since:
    Dec 2010

    Posted 10 Dec 2013 Link to this post

    Petur & the Kendo team in general

    I am a customer and your answer would be acceptable if KendoUI had great documentation but it does not. Though it has improved a bit with the last release. 

    The Kendo framework is impressive but customer hostile responses like this and an incoherent documentation strategy has me seriously looking at switching to Wijmo.

    They unlike Telerik seem to understand that what makes a great product as opposed to a great technology is great documentation (and no - making me search through your blog for examples doesn't count), great support and a great community.  I really like your product but answers like this and the lackadaisical approach  to documentation  means I  and many others will go to other vendors unless Telerik stops taking its customers for granted.

    Best

    Terence
  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 11 Dec 2013 Link to this post

    Hello guys,

    First of all I would like to apologize - as a matter of fact, my previous reply was intended for another ticket which I was working on at the same time. I sincerely apologize for the confusion and the caused inconvenience.
    Regarding the documentation issues, I (and the whole Kendo UI team) agree that there is much to be improved there and we are working on it. I hope that you will like the improvements that we are going to introduce in the next several months.

    As for the original question, (the multiple window widgets that you have on the page) Leszek, you can configure them to be loaded with Ajax (demo here). In such case you will have to use the refresh event to wait until the request has completed and then call the kendo.bind method to bind the content of the window to the corresponding ViewModel.

    Another approach would be to use the TabStrip widget instead (again loading its tab contents with Ajax) and bind to the ViewModels when the contentLoad event is triggered (it is similar to the refresh event of the window).

    Regarding the JavaScript required to declare the ViewModels themselves you can use separate JavaScript files loaded to the page before invoking the kendo.bind method. Or you can put them into script tags inside the partial views – the JavaScript will be executed when the content is appended to the DOM. I tried on my side and any script tags inside the partial views will be executed before the refresh/contentLoad event is triggered.

    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!
  6. Terence
    Terence avatar
    7 posts
    Member since:
    Dec 2010

    Posted 15 Dec 2013 Link to this post

    Thanks for the reply.  I am glad you guys are aware of the issues and are working to resolve them.  

    Best,

    Terence
Back to Top