Editor form creating a button for the other editor.

Editor form creating a button for the other editor.

edanyildizedanyildiz Posts: 43Questions: 13Answers: 4

I have 2 tables and 2 editor (joined tables) in one page,
while i am creating a new record in the first editor form, is it possible to trigger opening .2 editor in the create form.
Please find the scenerio below;

    buttons: [
        { extend: 'create', editor: products_editor },
        {
            extend: "selectedSingle",
            text: 'Çoğalt',
            action: function ( e, dt, node, config ) {
                // Place the selected row into edit mode (but hidden),
                // then get the values for all fields in the form
                var values = products_editor.edit(
                        products_table.row( { selected: true } ).index(),
                        false
                    )
                    .val();

                // Create a new entry (discarding the previous edit) and
                // set the values from the read values
                products_editor
                    .create( {
                        title: 'Kaydı çoğalt',
                        buttons: 'Kaydet'
                    } )
                    .set( values );
            }
        },
        { extend: 'edit',   editor: products_editor, 

        formButtons: [
                'Kaydet',
                { label: 'Yeni Kategori', fn: function () { 
                // Is it possible here to trigger opening other editor and create new record?                   
                this.close(); 

                  } }
            ]
        },
        { extend: 'remove', editor: products_editor }
    ]

This question has an accepted answers - jump to answer

Answers

  • edanyildizedanyildiz Posts: 43Questions: 13Answers: 4

    here is the scenerio;

  • allanallan Posts: 64,757Questions: 1Answers: 10,716 Site admin
    Answer ✓

    I'm sorry to say that nested Editors is not something that is currently supported. It is something I would like to add in future, and you can currently have multiple Editor instances, but the display of the forms is shared, and there isn't a clean way to switch between them.

    Allan

  • edanyildizedanyildiz Posts: 43Questions: 13Answers: 4

    Thank you for your support Allan.

This discussion has been closed.