programming4us
programming4us
WEBSITE

InfoPath with SharePoint 2010 : Apply Rich Text to the Entry

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
6/25/2014 9:50:02 PM
Scenario/Problem:Following the procedures in the previous sections produces the change HTML but does not apply rich text formatting to the entry. You therefore need to apply rich text formatting to the entry.

Solution:Add code to append the Changes value.

The last section of code in the method creates the new entry, but the Changes field contains only text. For the rich text to appear, the value needs to be appended to the Changes field. Add the code in Listing 1 to the bottom of your method.

Listing 1. Apply Rich Text
//Apply Rich Text to new Element
XPathNavigator repTable = MainDataSource.CreateNavigator();
XPathNodeIterator repTableRows = repTable.Select("/MY:MYFIELDS/
MY:GROUPTRACKCHANGES/MY:GROUPCHANGES", NamespaceManager);
if (repTableRows.Count > 0)
{
int i = repTableRows.Count;
repTable.SelectSingleNode
("/MY:MYFIELDS/MY:GROUPTRACKCHANGES/MY:GROUPCHANGES[" + i +
"]/MY:CHANGES", NamespaceManager).SetValue("");
repTable.SelectSingleNode
("/MY:MYFIELDS/MY:GROUPTRACKCHANGES/MY:GROUPCHANGES[" + i +
"]/MY:CHANGES", NamespaceManager).AppendChild(newValue);
}

The code now produces the desired rich text within the rich text boxes, as shown in Figure 1.

Figure 1. Appending the value produces the desired rich text.
Other  
  •  InfoPath with SharePoint 2010 : Add Changed Event Code for Tracking Changes
  •  InfoPath with SharePoint 2010 : Set Up the Form for Tracking Changes
  •  Sharepoint 2013 : Farm Management - Rename a Server on the Farm, Display the Configured Managed Paths
  •  Sharepoint 2013 : Farm Management - Retrieve the System Accounts, Retrieve Managed Accounts
  •  Sharepoint 2013 : Farm Management - Refresh Installed Products,Change the Port of Central Admin,Change the Farm Passphrase
  •  Sharepoint 2013 : Farm Management - Review Farm Configuration Values,Set the Farm Configuration Values
  •  Web User’s Best Buys March 2014
  •  Sharepoint 2013 : Using SkyDrive Pro - Discontinuing sync between SkyDrive Pro and your local device
  •  Sharepoint 2013 : Using SkyDrive Pro - Locating followed documents by using SkyDrive Pro, Synchronizing SkyDrive Pro to your local computer
  •  Sharepoint 2013 : Using SkyDrive Pro - Following SkyDrive Pro documents, Locating followed documents by using the newsfeed
  •  
    Top 10
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
    - Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
    - Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
    - Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
    - Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    programming4us programming4us
    programming4us
     
     
    programming4us