Basically I can create DataTable with Editor now. But, I can't add in the buttons.

Basically I can create DataTable with Editor now. But, I can't add in the buttons.

wonglikwonglik Posts: 33Questions: 3Answers: 0

I have tried to add in Excel button as below but failed.

                                    { extend: 'excel', title: null},
                                    { extend: 'create', editor: editor },
                                    { extend: 'edit', editor: editor },
                                    { extend: 'remove', editor: editor },

The New, Edit, Delete Buttons still there, but not the excel button. Can tell me what I have missed?

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    You probably missed a source file. If you look at this example here, ensure you have the necessary files listed on the Javascript and CSS tabs beneath the table.

    If still no joy, take a look at the browser's console in case there are errors being generated.

    Colin

  • wonglikwonglik Posts: 33Questions: 3Answers: 0

    Thank You.
    I have just changed { extend: 'excel', title: null}, to { extend: 'excel', editor: null},
    The button is shown and I can transfer data list to Excel.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    There is no editor parameter for the excel button type so you could use:

    { extend: 'excel' }
    

    or since you aren't actually defining any properties for it, simply:

    'excel'
    

    Allan

  • wonglikwonglik Posts: 33Questions: 3Answers: 0

    Sorry, I mean I have changed to { extend: 'excel', editor: editor, title: null },
    It works fine for Excel output without title.

Sign In or Register to comment.