Create multiple new records server side with client default values

Create multiple new records server side with client default values

dp@ii.netdp@ii.net Posts: 38Questions: 10Answers: 0

Datatables has so many great features that I'm sure this must be easy - but didn't find any hints yet.

I want a popup of some sort to ask the number of new records that are needed and then have the server side (PHP) create that many records.

any hints ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    New feature in 1.5 :-). The way to do it is pass the number of rows to be created into the create() method as the first parameter (not documented on this site yet, as the documentation refers to the current release).

    So for example, to create 5 new rows you might do:

    editor.create( 5, {
      title: "Create new rows",
      buttons: "Create"
    } );
    

    You could trigger that form a Buttons or TableTools button, or from any old jQuery event handler you want.

    Allan

  • dp@ii.netdp@ii.net Posts: 38Questions: 10Answers: 0

    awesome !

This discussion has been closed.