Rich Text Box - InfoPath Dev
in

InfoPath Dev

Rich Text Box

Last post 01-10-2006 08:08 AM by sjc724. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-09-2006 07:59 AM

    Rich Text Box

    Hi all,

    I'm having a hard time binding the Rich Text Box control to my web service from within a repeating section. I've read through the posts and I tried the Microsoft suggestion of returning XHTML from my web service but IP still wouldn't let me bind to a repeating section.

    Is there some way to modify the XML or XSL so that IP will know the field is repeating? All I really want is to return an array of strings from my web service that will bind to the RTB control in a repeating section! Isn't there some easy way to do this??

    Thanks!
  • 01-09-2006 09:16 AM In reply to

    Hi,
    RichText box can be binded to only main datasource nodes for editing.
    If your webservice connection is a main dataconnection then you can bind your strings to a richtextbox. The reason for this is,
    When you add a richtext box to UI then one reference of it is stored in manifest.xsf, This is for enabling richtext features. Most of the time secondary datasource references are not stored in manifest.xsf file.

    So if you want to edit your fields with richtextbox then they need to be main datasource fields.

    Agni
    InfoPath Dev India
  • 01-09-2006 09:24 AM In reply to

    Thanks for your response.

    The data I am trying to bind is in my main data connection. I return an object from my web method that contains several strings and one string array; it is the string array that I am trying to bind to the RTB but IP will not allow it. I think the issue is that I want to bind the string array to a RTB in a repeating section so that each string will display in its own RTB.

    I hope that is clear, any additional help is appreciated.
  • 01-09-2006 09:42 AM In reply to

    Hi,
    Did you check out the type of the field in the schema? It should be of
    <xsd:element name="sss">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/1999/xhtml" processContents="lax"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

    If it is not of the above type then change the schema file to be that way.

    Agni
    InfoPath Dev India
  • 01-09-2006 10:07 AM In reply to

    Thanks for the suggestion. I copied your code to my .xsd file (changed the element name) but IP won't let me open the form now. The error only I get says that "InfoPath has encountered an error. The operation failed".

    Was it correct to just comment out the element in question and replace it with your xml code above? I haven't worked much with XML so maybe I'm just missing something.
  • 01-09-2006 10:16 AM In reply to

    Add following lines to your node defination. Study the lines it is specifying type for your node. If it is of the following type then only you can add a richtext box to that control.
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/1999/xhtml" processContents="lax"/>
    </xsd:sequence>
    </xsd:complexType>


    Agni
    InfoPath Dev India
  • 01-09-2006 10:21 AM In reply to

    Ok, I get it. My element is defined as follows:

    <s:element minOccurs="0" maxOccurs="1" name="supplements" type="s0:ArrayOfString"/>

    What data would I have to return from my web service to create an element definition like your example?
  • 01-10-2006 12:19 AM In reply to

    Hi,

    See this page:

    http://support.microsoft.com/kb/826996/en-us

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-10-2006 08:08 AM In reply to

    I finally got this to work!

    I used the code from the Microsoft example to generate xml nodes. I added the xml nodes to an array within the class that I am returning from my web service and InfoPath allowed me to bind to the array of nodes and create a repeating section with the RTB control.

    Thanks for all your help!
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.