jQuery UI Widgets Forums Grid Data and encoding, what's the way to go?

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  Nicolas 11 years ago.

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

  • Nicolas
    Participant

    Hi!
    Here is my problem : in my jqxGrid I sometimes needs to show values like this “<html>”. I can’t pass such a value to my grid, or it will be considered like a html tag, and user will not see it on screen. To fix that, I HTML encode it on server side, and then pass it to the client in a json like “<html>”.

    But, if the user exports the grid in CSV, he will get a “<html&gt” instead of “<html>”.

    How can I fix that? How do the jqWidgets handle those problem? Should I html encode the value only on client side? If yes, how to you make sure the json is always fine?

    Regards


    Peter Stoev
    Keymaster

    Hi Nicolas,

    If you have HTML values, the Grid will display them as HTML values, not as text. If you wish, you can customize the Export because, the exportdata method accepts a parameter called “rows” which is an Array. You can pass your own prepared array when you call the method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    Nicolas
    Participant

    This is fantastic news! Sorry for not noticing this parameters before, I though it was more like an array with the index of the rows I wanted to be export. Thank you! This will solve my problem!

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

You must be logged in to reply to this topic.