3.2.0

Is there anyway for the Grid to allow the display of apostrophes?

Apostrophe's in text are a fact of life but when I have a piece of text in a database and example code like the following to display the text, it just breaks the entire javascript and no display occurs.

oGridCell = new Object;
oGridCell.ID = GridCurID;
GridCurCol++;
oGridCell.Name = '';
oGridCell.Type = idxGrid_Text;
oGridCell.SortVal = '<%=rs("Area_Interest_1")%>.';
oGridCell.HTML = oGridCell.SortVal;
oGridCell.Column=GridCurCol;
GridCell_4 = oGridCell;

Note that surrounding the SortVal value with quotations or single quotes makes no difference. Same result.

Any ideas?

thanks.
Steve
November 12,
The apostrophes are probably being interpreted as HTML special characters. http://www.google.com/search?hl=en&q=html+special+characters&aq=1&oq=html+special+ch

You'll need to convert them to their equivalent HTML code.
Anthony
November 12,
Bah, so instead of just feeding my db data directly I'll need to convert. I just wrote my own grid yesterday afternoon so I think I'll do it. It isn't client based javascript but that means less code feeding to the client as well. Regardless, I'll keep in mind what you said if I use the activegrid again.

thanks!
Steve
November 13,
No, it should be easier than that. Look at the cell value methods http://www.activewidgets.com/aw.ui.grid/cell-value.html and the cell text ones.
Anthony
November 13,

This topic is archived.

See also:


Back to support forum