jQuery UI Widgets Forums Grid cellsrender function breakage between 3.7.1 and 3.8.0?

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

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

  • jcwren
    Participant

    In 3.7.1, using the cellsrender function, if I wanted to NOT modify the cells content, I’d return the ‘defaulthtml’ parameter, and the cell would render correctly. If I wanted to apply additional formatting to the cell (like setting the background of the cell red), I’d return something like <div style=”background-color: red; width: 100%, height: 100%>”>’ + defaultHTML + ‘</div>’. This resulted in the ‘defaulthtml’ becoming a nested <div> under the additional CSS.

    In 3.8.0, something has changed. Returning ‘defaulthtml’ causes the cell to be blank. It’s as if 3.8.0 is detecting that HTML instead of an unformatted value is being returned, and discards the contents. Returning ‘value’ causes all the default cell formatting to be lost.

    Included are two images, one of the CSS from 3.7.1, and one from 3.8.0.

    3.7.1 CSS
    3.8.0 CSS


    Dimitar
    Participant

    Hello jcwren,

    Thank you for your feedback. We confirm the issue regarding defaulthtml. Here is a workaround we suggest:

    var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties, rowdata) {
        return '<div style="overflow: hidden;  text-overflow: ellipsis; text-align: ' + columnproperties.cellsalign + '; margin-right: 2px; margin-left: 4px; margin-top: 4px;">' + value + '</div>';
    }

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    jcwren
    Participant

    This gets pretty close, but the padding is off. Interestingly, inserting ‘padding-bottom: 2px’ into the returned HTML appears to be what causes the cells not to display. Deliberately misspelling ‘padding-bottom’ as ‘paddingg-bottom’ will display the cell contents, but ‘padding-bbottom’ will not.


    Dimitar
    Participant

    Hi jcwren,

    This issue will be fixed in the next version of jQWidgets.

    Best Regards,
    Dimitar

    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.