Grid Inline Adding not working

4 posts, 2 answers
  1. Grant
    Grant avatar
    114 posts
    Member since:
    Jul 2016

    Posted 17 Jan 2017 Link to this post

    Hi, 

    I dont know much about inline editing so Im a little lost with this error, but whenever I try to add a new row, an error is thrown in the console. However if I edit, no error is thrown.

    Dojo Example: http://dojo.telerik.com/OPEXO

    There isnt much functionality at this stage as I just started when this came up.

    Any advice would be appreciated.

    Thanks,
    Grant

  2. Answer
    Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1049 posts

    Posted 18 Jan 2017 Link to this post

    Hello Grant,

    Thank you for the runnable example.

    The described error is caused by the fact that an attempt to reference a nested property on a complex object is made (when a new item is added, its "escalationMethod" is still not defined, and escalationMethod.description leads to the JavaScript TypeError).

    You can use the schema.model option to provide a default value for all such complex properties, e.g.:

    http://dojo.telerik.com/OPEXO/2

    On a side note, please mind that the dataSource.transport should be properly configured for CRUD operations in editing scenarios. You can find detailed explanation and examples in the following section of our documentation:

    http://docs.telerik.com/kendo-ui/framework/datasource/crud

    I hope this helps.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Grant
    Grant avatar
    114 posts
    Member since:
    Jul 2016

    Posted 19 Jan 2017 Link to this post

    HI Dimiter, 

    Thank you SO much for you help, my inline grid functionality has grown considerably since this post due to you advice. This is the first inline Grid I've done, so it allowed me to explore the dataSource.schema attribute in more depth, which has been helpful. In the past I've been using custom windows to capture data, but now that my understanding has grown, I may be able to use the built in popup in the future (very exciting!).

    This work has lead me to a couple questions I was hoping you could answer, I've updated the demo for this, http://dojo.telerik.com/OPEXO/4

    1) If you look at line 44, inside the editor Im initializing a kendoNumericTextBox, how would I dynamially set the max attribute here to the next number in the 'Escalation Level' sequence, in this case 4?
    2) I also need to dynamically set the default values for both 'escalationLevel' and 'escaltionAfterDuration', details on lines 101 and 120 respectively. 

    Once again, thanks for the help, much appreciated,
    Grant

  4. Answer
    Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1049 posts

    Posted 20 Jan 2017 Link to this post

    Hi Grant,

    All desired functionalities can be achieved via applying some custom logic, based on the Grid's dataSource data()/view() and total(), e.g.:

    http://dojo.telerik.com/OPEXO/5

    On a side note, for questions that are not related to the thread's original topic and scenario, please open a new thread. This will facilitate a tidier support history of your account and better support service.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top