Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jqgriddownload

Package Overview
Dependencies
Maintainers
0
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jqgriddownload

CSV download plugin for free-jqgrid: https://www.npmjs.com/package/free-jqgrid

  • 1.8.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

jqgrid_download

jqgrid_download is a convenient simple csv download plugin for the free-jqgrid.

Add an import tag to your html website

 <script type="text/javascript" src="https://foo.com/node_modules/jqgriddownload/dist/jqgriddownload.js"></script>

Declare a CSV OR Excel button in your Grid init

.jqGrid("navButtonAdd", "#grid_toppager", {
        caption: "Download CSV",
        id:"download",
        buttonicon: "fa-file-excel-o",
        onClickButton: function(err,res){
         jQuery(this).jqGrid("jqgrid_download",'csv');
        }
  }).jqGrid("navButtonAdd", "#grid_toppager",
  {
    caption: "Excel",
    id: "Excel",
    buttonicon: "fa-file-excel-o",
    onClickButton: function(err, res)
    {
      jQuery(this).jqGrid("jqgrid_download", 'xlsx');
    }
  });


Nother example:

  jQuery("#grid").jqGrid(
  {
    colModel: col_model,
    data: data,
    loadonce: true,
    beforeRequest: function(id)
    {
      setTimeout(function()
      {
        waitingDialog.hide();
      }, 1000);
    },
    rownumbers: true,
    iconSet: 'fontAwesome',
    searching:
    {
      defaultSearch: "bw"
    },
    pagger: true,
    rowNum: 50,
    sortname: "invdate",
    sortorder: "desc",
    toppager: true,
    caption: 'Pictures',
    logger: 'jqgriddownload',
    autowith: true,
    shrinkToFit: false,
    cmTemplate:
    {
      autoResizable: true,
      editable: true
    }
  }).jqGrid("filterToolbar",
  {
    searchOnEnter: true,
    enableClear: false
  }).jqGrid("gridResize").jqGrid("inlineNav",
  {
    edit: false,
    add: false,
    save: true,
    cancel: true
  }).jqGrid("navButtonAdd", "#grid_toppager",
  {
    caption: "Excel",
    id: "Excel",
    buttonicon: "fa-file-excel-o",
    onClickButton: function(err, res)
    {
      jQuery(this).jqGrid("jqgrid_download", 'xlsx');
    }
  });

Sponsors:

  • https://www.merc.biz
  • https://bueroloewenherz.com
  • https://www.body-piercing.com

Jqgriddownload

GPL licenses Module to Download CSV or Excel files from Jqgrid

Jqgriddownload~is_int(--)

Kind: inner method of Jqgriddownload

ParamTypeDescription
--stringcheck if integer

Jqgriddownload~eachColumnInRange(ws)

Kind: inner method of Jqgriddownload

ParamTypeDescription
wsstringformat: csv or xlsx

Jqgriddownload~date_formatter(cell_value, format) ⇒ string

Kind: inner method of Jqgriddownload
Returns: string - = string like '02/06/2023'
Example:: your col_model : .... {'name': 'order_date', 'download_formatter': 'date_formatter--dd/mm/yyyy'}, ....

ParamTypeDefaultDescription
cell_valuestringcel_value as a string, for the moment only iso 112 20230602 is supported
formatstring"dd/mm/yyyy"format, style like 'dd/mm/yyy'

Jqgriddownload~date_to_string(date, y) ⇒ string

Kind: inner method of Jqgriddownload
Returns: string - = string like '02/06/2023'
Example:: let d = new Date(); let x = date_to_string(d,'dd/mm/yyyy'); console.log(x);

ParamTypeDescription
dateobjectdate object
ystringformat, style like 'dd/mm/yyy'

Keywords

FAQs

Package last updated on 12 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc