Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2005

Tip: Looking for answers? Try searching our database.

Multi line data is displayed in single line in rich text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amit - 29 Nov 2005 07:36 GMT
Hi,
I have one application developed in Microsoft Office Infopath 2003.
In application, users can navigate between views. Data in view is saved in
database in xml format on Next button click by calling the web service from
Jscript.

When user clicks the Prev button or opens then form next time, I am
populating rich text box by retrieving the xml saved in database.

Problem: Multi line data is displayed in single line in rich text box, after
retrieving data from database.
Same data (multi line) is displayed properly, if I use the Text Box instead
of Rich Text Box.

Note: I have given all available formatting in Rich Text Box Properties
(Paragraph breaks, Character Formatting, Full Rich Text and Wrap Text).
I kept the break point in Jscript by using ‘debugger;’ statement and checked
the XDocument.DOM.xml after assigning the value retrieved from database to
Rich Text Box and there also multiline data is coming properly. But when data
is displayed in form’s view in rich text box, all enter characters are lost
and multi line data is displayed in single line.

Regards,
Amit.
Franck Dauché - 29 Nov 2005 07:45 GMT
Hi,

You may want to look into appendChild to add lines in your Rich Text Box.

Regards,

Franck Dauché

> Hi,
> I have one application developed in Microsoft Office Infopath 2003.
[quoted text clipped - 20 lines]
> Regards,
> Amit.
Amit - 29 Nov 2005 09:01 GMT
Thanks for quick response.

In fact, when we just navigate between views and do not retrieve the data
from database for rich text box, then multi line data is preserved in rich
text box.
But at that time, it adds “<div xmlns=\"http://www.w3.org/1999/xhtml\">
</div>” for all line breaks and all data is stored between “<div
xmlns=\"http://www.w3.org/1999/xhtml\">” and “</div>” tags. You can check
this by viewing the XDocument.DOM.xml in debug mode.

I tried to give data as mentioned above to rich text box but then “<div
xmlns=\"http://www.w3.org/1999/xhtml\">” and “</div>” tags are also displayed
in rich text box.

For time being, I will go ahead with text box instead of rich text box.

Regards,
Amit.

> Hi,
>
[quoted text clipped - 28 lines]
> > Regards,
> > Amit.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.