Author Topic: Export xlsx file  (Read 184 times)

STEVE

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 47
    • View Profile
Export xlsx file
« on: July 09, 2022, 06:28:09 am »
Dear paramvir,

I want to know how to prevent this html tag when I export excel file?

Quote

 In downloaded excel file, it has this like <button type='button' class='delete_btn'>Delete</button>


Best regards,
Steve.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5637
    • View Profile
Re: Export xlsx file
« Reply #1 on: July 11, 2022, 09:52:30 am »
[ Only Pro members may read this post. ]

STEVE

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Export xlsx file without html tag
« Reply #2 on: July 21, 2022, 06:43:37 pm »
I put it after sortable: false. 
But it didn't work at all.

Code: [Select]
                    title: "", editable: false, minWidth: 83, sortable: false, exportRender: false,
                    render: function (ui) {
                        return "<button type='button' class='delete_btn'>Delete</button>";
                    },
                    postRender: function (ui) {
                        var rowIndx = ui.rowIndx,
                            grid = this,
                            $cell = grid.getCell(ui);

                        $cell.find("button").button({ icons: { primary: 'ui-icon-scissors' } })
                        .bind("click", function () {

                            grid.addClass({ rowIndx: ui.rowIndx, cls: 'pq-row-delete' });

                            setTimeout(function () {
                                var ans = window.confirm("Are you sure to delete row No " + (rowIndx + 1) + "?");
                                grid.removeClass({ rowIndx: rowIndx, cls: 'pq-row-delete' });
                                if (ans) {
                                    grid.deleteRow({ rowIndx: rowIndx });
                                }
                            })
                        });
                    }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5637
    • View Profile
Re: Export xlsx file
« Reply #3 on: July 22, 2022, 02:31:17 pm »
[ Only Pro members may read this post. ]