Error : Uncaught TypeError: Cannot read property 'replace' of undefined

4 posts, 0 answers
  1. Neeraj
    Neeraj avatar
    138 posts
    Member since:
    May 2015

    Posted 03 Oct 2018 Link to this post

    Hello ,
                  When i bind my viewModel with selector div ,as shown below,
    kendo.bind($("#SampleDivContainer"), viewModel);

      following error is shown and app is crashed :
        Uncaught TypeError: Cannot read property 'replace' of undefined

                Is it template error or viewModel error, is there some idenfication/error document which can help me to handle error like this in future?
  2. Neeraj
    Neeraj avatar
    138 posts
    Member since:
    May 2015

    Posted 03 Oct 2018 in reply to Neeraj Link to this post

    Neeraj said:Hello ,
                  When i bind my viewModel with selector div ,as shown below,
    kendo.bind($("#SampleDivContainer"), viewModel);

      following error is shown and app is crashed :
        Uncaught TypeError: Cannot read property 'replace' of undefined

                Is it template error or viewModel error, is there some idenfication/error document which can help me to handle error like this in future?


    When i refresh the page, it works fine and error doesnt occur.

     

     

  3. Neeraj
    Neeraj avatar
    138 posts
    Member since:
    May 2015

    Posted 03 Oct 2018 in reply to Neeraj Link to this post

    When i refresh the page and again call same function, everything works fine. I dont want to refresh page. everything is asynchronous
  4. Neli
    Admin
    Neli avatar
    309 posts

    Posted 05 Oct 2018 Link to this post

    Hi Neeraj,

    In order to be able to help you we will need more details about the exact implementation. I will appreciate if you could send us a small runnable example where the issue is replicated.
    Here you will find the MVVM template binding Demo, that could help.
    Such error is discussed also in the Forum thread linked here.

    Regards,
    Neli
    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.
Back to Top