"Object expected" error when expanding updated grid row

2 posts, 1 answers
  1. Clarissa
    Clarissa avatar
    6 posts
    Member since:
    Sep 2017

    Posted 15 May 2018 Link to this post

    I have this code:


    It works fine until addHistory() function is not fired. After that, the last added row in the gird is throwing "Object expected" when expanded.

    In the dojo and the button added the error is a bit different but I think the root of the problem is the same.

    What is the issue here?

  2. Answer
    Viktor Tachev
    Viktor Tachev avatar
    2497 posts

    Posted 16 May 2018 Link to this post

    Hi Clarissa,

    I have examined the code and noticed that the historyGrid() method initiates a new Grid widget. When the button is clicked the method is called again and a new widget is created. However the old instance is not destroyed. This is why an error is shown. 

    With that said, if you would like to add items to the Grid dataSource I would suggest using the add() method. The dojo below outlines the approach:


    Give the approach a try and let me know how it works for you.

    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top