I’m using TRichView inplace editors with cxGrid (Table and BandedTable views) version 2011 vol 2.4.
I have a big problem: All RichView cells are displaying the RTF as plain text !
When I click on one cell to edit it, the RTF is correctly displayed, but when I exit the editor the RTF is displayed again again as plain text.
PLEASE HELP ! Going on production on monday !
PS : RTF Plain text = -8 1 3 1 -7 0 -1 0 0 0 0 536870911 -9 2 0 0 2 0 1 Y ...
Thank you in advance !
Big problem with TRichView and cxGrid
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 10
- Joined: Thu Jul 05, 2012 1:00 pm
Hi Sergey,
Thank you for you prompt reply.
The field is working fine with a TcxDBTRichViewEdit, but when I need to show/edit the same field in a cxGrid I'm getting this strange behavior ... when the field/cell is not in edit mode it displays the RVF as plan text, when the field/cell enter in edit mode (after clicking in the cell) everithing is fine ...
Please, take a look here :
http://screencast.com/t/Xeql4O8mv
Thank you for you prompt reply.
The field is working fine with a TcxDBTRichViewEdit, but when I need to show/edit the same field in a cxGrid I'm getting this strange behavior ... when the field/cell is not in edit mode it displays the RVF as plan text, when the field/cell enter in edit mode (after clicking in the cell) everithing is fine ...
Please, take a look here :
http://screencast.com/t/Xeql4O8mv
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
There is a problem in TcxGrid, when a memo field is used.
When data are read from a database, they are passed to edited cell as AnsiString, to other cells as UnicodeString. TRichView can read RVF from AnsiString, but cannot from UnicodeString. Even a text-mode RVF can contain characters with codes > 127 (for example, non-text item properties are saved in UTF-8), so conversion of RVF from AnsiString to UnicodeString and back may lose information.
Solution: do not use memo fields for RVF format, use binary field.
PS I found my discussion with DevExpress developer about this issue (in December 2011): if a field type is ftMemo, in Delphi 2009+, field data are passed as UnicodeString to inplace editor, and as AnsiString to other cell. It happens for all inplace editor types, not only for TRichView (for example, for their memo fields). Probably, they forgot about this issue :(
When data are read from a database, they are passed to edited cell as AnsiString, to other cells as UnicodeString. TRichView can read RVF from AnsiString, but cannot from UnicodeString. Even a text-mode RVF can contain characters with codes > 127 (for example, non-text item properties are saved in UTF-8), so conversion of RVF from AnsiString to UnicodeString and back may lose information.
Solution: do not use memo fields for RVF format, use binary field.
PS I found my discussion with DevExpress developer about this issue (in December 2011): if a field type is ftMemo, in Delphi 2009+, field data are passed as UnicodeString to inplace editor, and as AnsiString to other cell. It happens for all inplace editor types, not only for TRichView (for example, for their memo fields). Probably, they forgot about this issue :(
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 10
- Joined: Thu Jul 05, 2012 1:00 pm
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: