Richtext control help

M

Marcus

I’m trying to use Richtext controls in browser enabled forms deployed to
SharePoint however I am experiencing several problems. Firstly having several
rich text controls on one view makes the form navigation slow and cumbersome
when it’s used in a browser in InfoPath its fine.

Also I’m trying to use some as a indicator where a value set in a drop down
control displays a certain icon depending on its value in a rich text
control. Much like a KPI indicator again this works fine in InfoPath but in
the browser form it responds slowly. I am using the following code to set the
icon however in the browser form the icons don't change unless the view is
switched or you press update.

<code>

public void ControlChangedSetIcon(String sNodeValue, String sControl)

{

XPathNavigator rtfNav = xNavigator.SelectSingleNode(sControl,
NamespaceManager);



string nValue = xNavigator.SelectSingleNode(sNodeValue,
NamespaceManager).Value;



if (rtfNav == null || nValue ==null)

return;



switch (nValue)

{

case "1":

rtfNav.InnerXml = "<img
xmlns=\"http://www.w3.org/1999/xhtml\"
src=\"http://domain/_layouts/images/KPINormal-1.GIF" + "\"/>";

break;

case "2":

rtfNav.InnerXml = "<img
xmlns=\"http://www.w3.org/1999/xhtml\"
src=\"http://domain/_layouts/images/KPINormal-0.GIF" + "\"/>";

break;

case "3":

rtfNav.InnerXml = "<img
xmlns=\"http://www.w3.org/1999/xhtml\"
src=\"http://domain/_layouts/images/ewr236m.gif" + "\"/>";

break;

default:

rtfNav.InnerXml = "<img
xmlns=\"http://www.w3.org/1999/xhtml\"
src=\"http://domain/_layouts/images/KPINormal-2.GIF" + "\"/>";

break;

}

}

</code>

Can anyone please advise? Is there a better method of doing this as it
appears I cant use ForceUpdate to the view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top