jQWidgets Forums

jQuery UI Widgets Forums General Discussions jqx-grid: cellsrenderer: call with complete rowdata

This topic contains 2 replies, has 2 voices, and was last updated by  badera 8 years, 8 months ago.

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

  • badera
    Participant

    Sometimes, it would be very helpful, if cellsrenderer would be called with the complete row data object rather than just the row index.
    We often need to access other columns data to render one special column. I know that we can get the row data with the row index – but in this case we need also access to the grid object or source object. Sometimes, we could design the code bether, if we would not need this dependency.
    Is this hard to add? – Just an additional function parameter.

    Best regards,
    – badera


    Peter Stoev
    Keymaster

    Hi badera,

    I think it’s already one. From the API Docs:

    cellsrenderer – sets a custom rendering function. The cellsrenderer function is called when a cell in the column is rendered. You can use it to override the built-in cells rendering. The cellsRenderer function has 6 parameters passed by jqxGrid – row index, data field, cell value, defaultHtml string that is rendered by the grid, column’s settings and the entire row’s data as JSON object

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    badera
    Participant

    Dear Peter

    Oh, yes, great! I missed this explanation, however, in the example below, this parameter is not used – therefore I missed it…
    Thank you very much! It will make my live easier 🙂

    – badera

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

You must be logged in to reply to this topic.