jQWidgets Forums

jQuery UI Widgets Forums Grid Column Header Renderer

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Column Header Renderer #53782

    faustin
    Participant

    I’m struggling trying to add a button next to the column header titles

    sledgeHammer.winnerButton = function() {
    	return '<div style="margin: 5px 0px 0px 5px;float:left;">' + response.map.account0Name + '</div> <div style="float:right;"><input type="button" value="Mark Winner" id="winner" /></div>';
    	};
    var jsonColumns = [
    			    { text: sledgeHammer.constants.gridTitles.EMPTY, cellclassname: sledgeHammer.checkAccountMatch, datafield: 'field', width: "20%"}, 
    			    { text: response.map.account0Name, renderer: sledgeHammer.winnerButton, datafield: 'account0value', width: "35%"},
    			    { text: response.map.accountNName, renderer: sledgeHammer.dropRenderer, datafield: 'accountNvalue', width: "35%"},
                    { text: sledgeHammer.constants.gridTitles.MATCH, datafield: 'matchIndicator', width: "10%" } 
                 ];

    What am I doing wrong? When I refresh I don’t see neither the button nor the title. The title is stored in response.map.account0Name

    thanks for your help!

    Column Header Renderer #53810

    Peter Stoev
    Keymaster

    Hi faustin,

    From the provided code, I cannot tell what goes wrong on your side, because if you have some undefined field(ex: response.map.account0Name is undefined) then the code will not work at all. Would you be able to provide a complete sample page which we would be able to test locally?

    Best Regards,
    Peter Stoev

    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.