jQuery UI Widgets Forums Grid what is the corresponding type for cellsformat 'p'

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • userdch
    Participant

    type(optional) – A string containing the data field’s type. Possible values: ‘string’, ‘date’, ‘number’, ‘bool’.
    – – –

    is there a specific type for percentage ?
    i have a column with attribute cellsformat: ‘p’ and when exported to spreadsheet 0.15% on screen gets exported as 15 in spreadsheet.
    i have the column specified as ‘number’ in the source.

    thanks for any help.

    columns: [
    { text: 'Difference', dataField: 'difference', width: 100, cellsalign: 'right', filterable: false, cellsformat: 'p' }
    ]
    var source =
    {
    datafields: [
    { name: 'difference', type: 'percent' }
    ],

    Dimitar
    Participant

    Hello

    Change the type of the datafield to ‘number’, but keep the cellsformat: ‘p’, i.e.:

    var source =
    {
    datafields: [
    { name: 'difference', type: 'number' }
    ],

    The data will be exported correctly and percentage values will be shown.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.