More in this section

Forums / Developing with Sitefinity / Telerik.Cms.Engine is null

Telerik.Cms.Engine is null

4 posts, 0 answered
  1. Sandip
    Sandip avatar
    9 posts
    Registered:
    27 Dec 2008
    14 Oct 2009
    Link to this post
    I am trying to use the templates for the Admin UI for the list. I get an javascript error while running the code 

    Sys.Application.add_load(loadData);

    function

     

    DataBindGrid(currentPageIndex, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL) {

     

     

    Telerik.Cms.Engine.Services.ContentService.GetContentItems

    Am I missing some initializing code?

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Oct 2009
    Link to this post
    Hi Sandip,

    You should call the WebService in DataBind function

    function DataBindGrid(FilterAsSQL) {
        Telerik.Sample.Services.ContactsService.GetItems(FilterAsSQL, dataProviderName, updateGrid, OnFailed);
    }
     
    // or as it is done in the default implementation
     
    Sys.Application.add_load(loadData);
    function DataBindGrid(currentPageIndex, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL) {
        var requiredMetaFields = ['Name', 'Author', 'Description'];
        var cultureInfoField = document.getElementById('<%= cultureInfoField.ClientID %>');
     
    // get the content items using web service methods.
         
    Telerik.Cms.Engine.Services.ContentService.GetContentItems(currentPageIndex * pageSize, pageSize,
        sortExpressionsAsSQL, filterExpressionsAsSQL, requiredMetaFields, cultureInfoField.value, dataProviderName, updateGrid, OnFailed);
    }

    Please take a look at the following sample which shows an implementation of RadGrid client side binding.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Sandip
    Sandip avatar
    9 posts
    Registered:
    27 Dec 2008
    14 Oct 2009
    Link to this post
    Ivan,

    I am trying to reuse the downloadable templates for the News module for implementing the Admin interface for my custom module based on the generic content. I assume I should be able to reuse most of the templates and it has same code as what you are explaining here. However when I run the code I get this error 'Telerik.cms.engine' is null or not an object. I would like to know how to initialize this object, is there any .js I need to include to get this working.

    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Oct 2009
    Link to this post
    Hello Sandip,

    There is no reason for the error you see if the js binding is correct. If you could send the template and your js we could see what is going wrong.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered