Expression Box with Rich Text Content doesn´t appear in browser enabled form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Expression Box with Rich Text Content doesn´t appear in browser enabled form

Last post 10-17-2008 05:22 AM by chandrakanth. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-11-2008 05:23 AM

    Expression Box with Rich Text Content doesn´t appear in browser enabled form

    Hello,

    i´ve created an infopath form which consists of 13 views. i have a view which is called "summary", there you can see the 13 views in an preview. i put the content of all the 13 views in the summary with managed code. i copy the innerxml of every node to the summary-view. i had a perfromance problem, because the numeral controls of the summary view were in rich-text. now i changed the fields in the summary view to expression boxes. But when i copy the rich text content of the views to the expression boxes of the summary, the formatting dissapears. i edited the xsl-file like in this article: http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Display-Rich-Content-in-an-Expression-Box.aspx 

    After i changed the xsl-file everything works fine in the infopath rich client, but if i upload it to sharepoint the summary view doesn´t show anything. it´s just an empty view without the content of the 13 views.

    Is there another possibility to change rich text fields and still have formatting fields? Can i dosomething with html-code? I tried to do something with conditional formatting, but there isnt a possibility to set tabs.

    Thanks for the help...

    Emmy

  • 09-12-2008 02:32 AM In reply to

    Re: Expression Box with Rich Text Content doesn´t appear in browser enabled form

    Hello Emmy,

    Can you please try this code for displayng the Rich text box content into the Expression Box. I think this will help you.

     public static void SetRichTextNodeValue(IXMLDOMNode expressionBoxNode, IXMLDOMNode richTextBoxNode)
            {

                if (expressionBoxNode == null || richTextBoxNode == null)
                    return;

                if (richTextBoxNode.text == "")
                {
                    expressionBoxNode.text = String.Empty;
                    return;
                }

                if (richTextBoxNode.firstChild == null)
                {
                    string value = richTextBoxNode.ToString();
                    if (richTextBoxNodes.text != value)
                        expressionBoxNode.text = value;
                }
                else
                {
                    expressionBoxNode.text = String.Empty;
                    IXMLDOMNodeList childNodes = richTextBoxNode.childNodes;
                    foreach (IXMLDOMNode childNode in childNodes)
                    {
                        expressionBoxNode.appendChild(childNode.cloneNode(true));
                    }
                }
            }

    Chandrakanth/GGKTech
  • 10-15-2008 07:03 AM In reply to

    Re: Expression Box with Rich Text Content doesn´t appear in browser enabled form

    Thanks for the answer, but unfortunately it doesn´t work. The expression boxes are getting the content of the rich-text boxes, but still without the formatting of the content. I hope there is another possibility to solve this perfomance problem....

  • 10-17-2008 05:22 AM In reply to

    Re: Expression Box with Rich Text Content doesn´t appear in browser enabled form

    Hi ,

    I done some sample codes on this functionality and atlast i found that we can only get the content of a rich text box into the Expression box but not formatting .

     

    Chandrakanth/GGKTech
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.