jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Print cellrender with image

This topic contains 7 replies, has 3 voices, and was last updated by  Hristo 8 years ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Grid Print cellrender with image #93234

    pablosym
    Participant

    Hi, I have a grid with a cell containing an image, when I print the folder and not the image, how can I solve it thanks

    Ej.

    columns: [
    { text: ‘CONTRATISTA’, datafield: ‘Company’, cellsalign: ‘left’, align: ‘center’, columngroup: ‘titulo’ },
    { text: ‘HAB’, datafield: ‘Income’, cellsalign: ‘center’, align: ‘center’, columngroup: ‘titulo’, width: 80, cellsrenderer: icoIncomeRender }
    ]

    var icoIncomeRender = function (row, column, value) {
    var Income = grid.jqxGrid(‘getrowdata’, row).Income;
    var img = ‘<div> </div>’;
    return img;
    };

    PRINT RESULT

    ‘hello word’, ‘http://localhost:53656/Images/Enabled.png’

    What hope
    ‘hello word’ , 🙂

    Grid Print cellrender with image #93248

    Hristo
    Participant

    Hello pablosym,

    Unfortunately, it is not possible to print images.
    It is possible only to represent the name of the images as a text of its name.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Grid Print cellrender with image #93267

    Dave_1
    Participant

    Hello ,

    In My grid i have 1 extra “SrNo ” Field , with numerical values generated on grid, am trying to print the grid with all details, but “SrNo” Field shows blank.

    Grid Print cellrender with image #93271

    Hristo
    Participant

    Hello Dave_1,

    You should check is correctly set the datafield of this column.
    Do you receive any error message in the console?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Grid Print cellrender with image #93277

    Dave_1
    Participant

    here is sample of my code

    { text: 'Sr No', sortable: false, filterable: false, editable: false, groupable: false, draggable: false, resizable: false, datafield: 'text', columntype: 'number', width: '5%', cellsrenderer: function (row, column, value) { return "<div style='margin:4px;'>" + (value + 1) + "</div>"; }},
    { text: 'First Name', datafield:'firstName', width: '15%'},
    { text: 'Middle Name', datafield: 'middleName', width: '15%'},
    { text: 'Last Name', datafield: 'lastName', width: '15%'}

    when i try to print grid with “Sr No”, it shows blank in print screen.

    Grid Print cellrender with image #93288

    Hristo
    Participant

    Hello Dave_1,

    I would suggest you another approach you could generate the desired value for that column in beforeLoadComplete callback of the DataAdapter.
    I also, want to add to the settings of this column it is not necessary to set all properties a lot of them are with a default value.
    Please, take a look at this example:
    https://www.jseditor.io/?key=export-grid-with-indexed-column

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Grid Print cellrender with image #93367

    Dave_1
    Participant

    Hi,

    one of my columns has number + string values this column does not show up on print screen.
    I tried type string parameter “type: ‘string’” but it did not work.
    is there any workaround for it.
    can we any third party tool to print jqxgrid data.

    Grid Print cellrender with image #93396

    Hristo
    Participant

    Hello Dave_1,

    You could use the same approach that I provided you in the previous post.
    Unfortunately, it is not possible to print (export) data created in the “cellsrenderer”.
    Please, take a look at this forum topic: http://www.jqwidgets.com/community/topic/export-cellsrenderer-problem/#post-22786

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.