Richtext control issues - InfoPath Dev
in

InfoPath Dev

Richtext control issues

Last post 03-12-2008 10:23 AM by Greg Collins. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-11-2008 02:52 AM

    Richtext control issues

    Hi all,

     

    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 for some time.

     <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?

  • 03-12-2008 10:23 AM In reply to

    Re: Richtext control issues

    Unfortunately, browser forms are not up-to-par with the fat-client forms. There are numerous reasons why a browser form will slow down--way beyond the scope of any reasonable conversation... but having too many controls in the view is one of those reasons. How many is too many? Again, hard to say.

    Certain things in browser forms do not occur until the form has done a post-back. It sounds very likely that unless the form does a post-back your images will not be updated. You will need to find some way to force a post-back. However, running of code normally does force a post-back, so I'm not sure what the deal is there.

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