volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 506 forks source link

ToolBar Implementation #686

Open SanjayJaiswal007 opened 11 years ago

SanjayJaiswal007 commented 11 years ago

Hi, Please give a demo example on ToolBar for "Export to Excel/PDF" using asp.net code, as I am struggling with the images and toolbar properties. I tried for all the changes but nothing showing as a toolbar. Plesae provide the .js file required with the small demo as u provided for paging/filtering.

Thanks, Sanjay

Xinne commented 11 years ago

Unfortunately, i don't have enough time to create a full working example. EPPlus is a great .net library that can read and write xlsx files. If you're struggling with the toolbar button...

toolbar: {
    items: [{
        icon: '/images/excel.png', //replace with your path
        text: 'Export to Excel',
        click: function () {
            //perform your custom job...
        }
    }
    }]
},

That's all! ofc you need to replace the icon loc. and click function with your own code..

SanjayJaiswal007 commented 11 years ago

Hi Xinne, I am using jTable.js version 2.3 with ASP.Net web forms and did the same code for adding the toolbar properties, but nothing is coming on the grid. That why I asked for some working example on toolbar. Can u share some asp.net code for export excel/pdf.

Xinne commented 11 years ago

Is your website live?

hacker commented 11 years ago

Struggled with that a bit too. It's worth noting that toolbar isn't shown if table has no title.