jQWidgets Forums

jQuery UI Widgets Forums Grid Column property: "renderer"

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 7 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Column property: "renderer" #100013

    Joe Weinpert
    Participant

    •renderer – sets a custom column renderer. This can be used for changing the built-in rendering of the column’s header.

    Any links to any examples of this column property?

    Column property: "renderer" #100019

    Martin
    Participant

    Hello Joe Weinpert,

    Here is how to use the renderer callback function:

    columns: [
        { text: 'Product Name', columngroup: 'ProductDetails', datafield: 'ProductName', width: 250, renderer: function (defaultText, alignment, height) {
            return '<span>hello!</span>';
        }
        },

    rendered may also be useful in such situations:

    columns: [
        { text: 'Product Name', columngroup: 'ProductDetails', datafield: 'ProductName', width: 250, rendered: function (header) {
            header.html("hello!");
            header.css("font-style", "italic");
        }
        },

    Best Regards,
    Martin

    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.