jQWidgets Forums

jQuery UI Widgets Forums Grid Image Button for Edit Column in jqxGrid

This topic contains 2 replies, has 3 voices, and was last updated by  rohitsud04 12 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Image Button for Edit Column in jqxGrid #10605

    Luiggi370z
    Member

    Hi,

    I would like to have a button in the edit column like the examples, but instead of text use an image from jquery ui or jqxtheme. I tried but i still dont get it.

    Is there any solution for this?

    Best Regards,

    Luis Arpasi

    Image Button for Edit Column in jqxGrid #10622

    Peter Stoev
    Keymaster

    Hi Luis,

    To customize the rendering of the Grid cells, see this help topic: jquery-grid-cellsrendering.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    rohitsud04
    Member

    Hi

    I wanted to add 2 images as hyperlinks in my jqxgrid, and these are the 3 steps i tried:

    1. I tried adding 2 images in a grid in 2 seperate columns.
    This worked fine, the height of the rows increased to accomodate the image height.

    2. Next I added a hyperlink to 1st of these columns and wrote a function for the hyperlink.
    var imagelinkrenderer = function (row, column, value) {

    value = ‘‘+”+’‘;
    // alert(row+”*”+column+”**”+value);
    return value;
    }

    This worked fine as well.

    3. When I tried to add the same value in cellrenderer of both columns, the height of the images gets reduced to 20px (though i can see the top of the images and the hyperlink is also there). Can you please help me understand what i am doing wrong ?

    Grid data that I am using is as below (for your reference):

    columns: [
    { text: ‘mypic1’, datafield: ‘myObverseImageSmall’, width: 110, cellsrenderer: imagelinkrenderer, sortable: false, filterable: false },
    { text: ‘mypic2’, datafield: ‘myReverseImageSmall’, width: 110, cellsrenderer: imagelinkrenderer, sortable: false, filterable: false },
    { text: ‘my Description’, datafield: ‘myDescription’, width: 300, cellsalign: ‘centre’, cellsformat: ‘c2’, cellsalign: ‘left’ }
    ]
    });

    Thanks
    Rohit

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

You must be logged in to reply to this topic.