jQuery UI Widgets Forums Grid More than one datafield possible for use in a single cell in jqxgrid?

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 8 months ago.

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

  • jmarais
    Participant

    I want to display a hyperlink in a cell but I want the link to display a name rather than the link itself. I do have the link and the name in my source but it seems to me that you can only use a single one in a cell. Therefore I cannot pass the name to the cellsrenderer, .i.e. linkrenderer or any similar function. How can one overcome this?

    A second question: when I format a cell for currency with c2, how can I change the currency symbol to something else than a $ sign?


    Peter Stoev
    Keymaster

    Hi jmarais,

    – The cellsrenderer callback function is called by the Grid passing several params – Rendered Row’s index, Column’s data field, cell value, the default HTML used for rendering and the column’s settings. As you cannot associate multiple data fields to one column, you can map your column’s value to your display value in your data collection because in the cellsrenderer you will know the row’s index and also the cell’s value. In addition, if you are using the jqxDataAdapter plug-in, you can use its ‘records’ property to get the Array of bound data records and retrieve a specific record by index.
    – For localization, take a look at this help topic: jquery-grid-localization.htm.

    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.