Special Characters in grid cell

I have a grid with a cell of type: ‘ed’ (I have also tried ‘edtxt’)

When I set this cell contents to something like: “me & marley”, it appears correctly in the cell.

It is being sent to the server and rendered back from the server using XML escape characters &.

However, when the user double-clicks to edit the contents of the cell, the user sees: “me & marley” instead of “me & marley”

After exiting “edit” mode, it properly goes back to “me & marley”

How do i prevent this un-user-friendly behavior??

(PS - of course same thing happens with all special characters like <, >, etc)

Solution is to use ‘edtxt’ type cell and when sending grid data via XML, enclose data in CDATA

“Solution is to use ‘edtxt’ type cell and when sending grid data via XML, enclose data in CDATA” works great.

However i have a grid cell which is a combo. So i cannot use ‘edtxt’ for column type but have to use ‘combo’ …


So when i click on grid cell, it opens up a combo box and when i start typing (i have enablefiltering mode enabled) i see all the values with special characters displayed correctly.

However, when i save the grid, the special characters are NOT displayed correctly anymore.

How can i solve this issue?


Am using dhtmlxGrid extensively but this problem is causing a lot of issues with records having special characters. any help will be very appreciated :sunglasses:

If you need a demo … please let me know and i will put one out.

My apologies. Was encoding the data twice.
Problem resolved.