Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2745
Resetting datasource - Cannot find schema
posted

I have a grid that I need to be able to drill into the children.  Previously I would reload the page with the child id but that would prevent the user from seeing the parent items.  For example:

Initial View:

  Parent
  Parent
  Parent
  Parent

On Parent Click - Refresh the View to Show the Children:

  Parent
    Child
    Child
    Child
  Parent
  Parent
  Parent

Here's the error I am receiving:

Microsoft JScript runtime error: There was an error parsing the JSON data and applying the defined data schema: Unable to get value of the property 'length': object is null or undefined

I've tried the following methods in a jQuery .ajax post success event:

${selector}.igGrid('dataSource', items);

${selector}.igGrid('dataSourceObject', items);

${selector}.igGrid({ dataSource : items });

${selector}.igGrid({ dataSourceObject : items });

And they all result in the same error.  Either it happens the data source is set, or when I try to data bind.  I've inspected the result coming back and it looks perfect.

The initial datasource is set via the model.

@(Html.Infragistics().Grid<ViewModel>()
...
.DataSource(Model.Items)
.DataBind()
.Render()
)

The client does not wish to use the hierarchical grid.  Our client does not want to see multiple headers.  The children and parent share the same data model.

Using CDN version 2059.

Thanks!