jQWidgets Forums

jQuery UI Widgets Forums Grid Image in Edit button column

This topic contains 3 replies, has 2 voices, and was last updated by  ivailo 9 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Image in Edit button column #77741

    alastairwalker
    Participant

    I want to replace the text ‘Edit’ in the edit button with a suitable image for editing.

    i.e. in the script:
    { text: ‘Edit’, datafield: ‘Edit’, width: 50, renderer: columnsrenderer, columntype: ‘button’, cellsrenderer: function () {
    return “Edit”;}

    My understanding is that the function in cellsrenderer: function () {return “Edit”;} should reference an image.

    I have looked at your examples, but have unable to get the button to show as an image.
    Any pointers to do this will be appreciated.
    Alastair

    Image in Edit button column #77748

    ivailo
    Participant

    Hi alastairwalker,

    This demo will be heplful for you.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Image in Edit button column #77753

    alastairwalker
    Participant

    I studied this demo. I have tried it out.

    I cannot seem to reduce the image per row to just one image to the column.

    I am really missing something – but i don’t get it.

    I am sure it must be very simple. But…

    Alastair

    Image in Edit button column #77847

    ivailo
    Participant

    Hi alastairwalker,

    You can simply set your image url variable to be fixed value.
    Here is the part of code that must be manipulated:
    var imgurl = '../../images/' + value.toLowerCase() + '.png';

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.