jQWidgets Forums

jQuery UI Widgets Forums Grid Grid shows raw html code for special characters on edit

This topic contains 3 replies, has 2 voices, and was last updated by  andy8 11 years, 7 months ago.

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

  • andy8
    Participant

    Hi All,

    I am having a hard time to understand a strange behavior of jqxGrid when editing cells. This is what happens:

    1. I have a grid with special characters (like &) in the 1st column. it is rendered from a database using json and shows special characters fine.

    2. The grid includes a few editable columns (dropdown and number inputs). An example of one column is shows below:

    {
    text: 'Change by',
    datafield: 'chngType',
    width: 106,
    editable: true,
    columntype: 'custom',
    createeditor: function (row, value, editor) {
    if (row <= 3) {
    return false;
    } else {
    editor.jqxDropDownList({
    source: sTypeAdapter,
    width: 105,
    displayMember: 'label',
    placeHolder: 'Stress shift',
    autoDropDownHeight: true,
    //dropDownHeight: 90,
    dropDownWidth: 104,
    selectedIndex: 0,
    valueMember: 'label'
    });
    }
    },
    initeditor: function (row, cellValue, editor, cellText, width, height) {
    if (row <= 3) {
    return false;
    } else {
    editor.jqxDropDownList('selectItem', cellValue);
    }
    },
    }

    3. When I double click on a cell of that column (when a small triangle on the right is shown). The 1st column special characters change from & to

    &amp;

    If I don’t change the dropdown value, the special characters stay the same, i.e. show the html code as

    &amp;

    However, if I change the dropdown value, they get back to normal, i.e. show & as it should be.

    Also, it changes special characters like described when I simply drag grid scroll bars.

    Any suggestions how to fix this?

    Thanks


    andy8
    Participant

    Further to my original post. It has nothing to do with editable cells, because dragging grid scroll bars cause the same effect. The issue can be easily replicated.


    Dimitar
    Participant

    Hello andy8,

    Please refer to the forum topic JSON and newline char for the answer to your question.

    Best Regards,
    Dimitar

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


    andy8
    Participant

    Thanks, Dimitar – all is working now.

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

You must be logged in to reply to this topic.