Binding to XML that Contains Null Data

2 posts, 0 answers
  1. Richard
    Richard avatar
    7 posts
    Member since:
    Sep 2011

    Posted 19 Sep 2011 Link to this post

    Hi,

    I have a grid binding nicely to a remote XML data source. The XML in question is generated from a database, which all works fine until there is a null entry in the data - which in turn removes the line from XML.

    A (very) simple example of the resulting XML would be as follows:

    <tblProduct>
      <Product>
        <name>This is a product</name>
        <code>PRO001</code>
        <description>A really great product.</description>
      </Product>
      <Product>
        <name>This is a product</name>
         <description>Another really great product.</description>

     
    </Product>
    </tblProduct>


    Note how there is no "code" field for the second "Product" entry. This is causing the grid to hang with the error:

    Error: d.Product_Code is undefined
    Source File: XXX/Scripts/Kendo_UI_Beta_2011_2_804/js/kendo.all.min.js
    Line: 1


    So my question is, is there a simple way to overcome this with the Kendo data source/grid control?

    Thanks!

  2. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 22 Sep 2011 Link to this post

    Hello Richard,

    Indeed, you are correct about this behavior. However, we were able to address it and the fix will be included in the next release of the library.

    All the best,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top