Add create button in grid toolbar template

2 posts, 1 answers
  1. Winston
    Winston avatar
    2 posts
    Member since:
    Oct 2012

    Posted 04 Nov 2012 Link to this post

    I would like to implement a template in the grid toolbar. I am just not sure how to add the "Add a new record" button that will call the
    .ToolBar(toolbar => toolbar.Create().Text("Create"))

    I am NOT using .NET so I will get an error Uncaught SyntaxError: Unexpected token >

    Please see my template code in the jsbin below.
  2. Answer
    OnaBai avatar
    55 posts
    Member since:
    Aug 2012

    Posted 04 Nov 2012 Link to this post

    Since you are invoking a "customFunc" on click, you should define it something like:

    function customFunc() {

    But before that you should define ShipAddress in your model otherwise create will fail.

Back to Top