Simple DataSource not working in Diagram (does work in e.g. Grid)

4 posts, 1 answers
  1. Itai
    Itai avatar
    33 posts
    Member since:
    Feb 2016

    Posted 09 Apr Link to this post

    I have made this very simple example which refuses to work: http://dojo.telerik.com/OtIhA

    I keep getting "Uncaught TypeError: Cannot read property 'toLowerCase' of undefined". 

    Curiously, changing 'kendoDiagram' to 'kendoGrid' works perfectly. So why does this data source work with Grid but not Diagram, and how can I get it to work? 

  2. Itai
    Itai avatar
    33 posts
    Member since:
    Feb 2016

    Posted 09 Apr Link to this post

    Well, apparently when providing "dataSource", you must provide connections, and they must be given in the form of a data source as well. Changing `connections` to `connectionsDataSource` solved the problem. 

     

    Still, a better error message and a mention in the documentation about this behavior would have been nice. 

  3. Kendo UI is VS 2017 Ready
  4. Answer
    Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 13 Apr Link to this post

    Hello,

    Indeed, the dataSource should be used with the connectionDataSource. The connections option should be used with the shapes option to statically set the elements with the options. Still, an error should not be thrown. We will fix it for the next internal build.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 19 Apr Link to this post

    Hello again,

    It seems that we cannot reliably avoid the error in this case. The diagram will expect a HierarchicalDataSource if a single dataSource is used and a flat dataSource instance is set in the scenario from the example. We will throw an error with meaningful message instead.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready