title: Widgets inside Dojo dgrid OnDemandList
body: <p>I'm trying to do something similar to <a href="https://stackoverflow.com/questions/13444162/widgets-inside-dojo-dgrid">this question</a> but using an OnDemandList instead of an OnDemandGrid.</p>
  
  <p>Here is what I have so far</p>
  
  <pre><code>define([
      "dojo/_base/declare",
      "dijit/_WidgetBase",
      "dijit/_TemplatedMixin",
      "dijit/_WidgetsInTemplateMixin",
      "dgrid/OnDemandList",
      "widget/CategoryItem",
      "dojo/dom-construct",
      "dojo/text!./templates/category-list.html"
  ], function(declare, _Widget, _TemplatedMixin, _WidgetsInTemplateMixin, OnDemandList, CategoryItem, domConstruct, template) {
      var CatList = declare([OnDemandList]);
      return declare([_Widget, _TemplatedMixin, _WidgetsInTemplateMixin], {
          templateString: template,
          baseClass: "category-list",
  
          postCreate: function() {
              this.inherited(arguments);
  
              // Create OnDemandList, place in div defined in template.
              var cat1 = this.cat1 = new CatList({
                  store: this.store,
                  renderRow: this.renderItem
              }, this.categoriesLevel0);
  
          },
  
          renderItem: function(item) {
              return new CategoryItem({
                  title: item.title
              });
          }
      });
  });
  </code></pre>
  
  <p>The problem is my renderItems function needs to somehow return a dom containing my custom widget. As it is now I get this error <code>Error on domReady callback: Error: NotFoundError: DOM Exception 8</code></p>