Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
OutOfMemoryException When using 3 bands in UltraWebGrid
posted

I am getting the following error when using a grid with 3 bands.

With the same grid, if I do not use the 3rd band its ok.

Additionally, if I set AutoGenerateColumns = true it works with the 3 bands.

 

Message:System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
   at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
   at System.Text.StringBuilder.Append(String value)
   at System.IO.StringWriter.Write(String value)
   at System.Web.UI.HtmlTextWriter.Write(String s)
   at System.Web.UI.HtmlTextWriter.Write(String s)
   at System.Xml.XmlTextEncoder.Write(String text)
   at System.Xml.XmlTextWriter.WriteString(String text)
   at System.Xml.XmlWriter.WriteAttributeString(String localName, String value)
   at Infragistics.WebUI.UltraWebGrid.XPathDataNavigator.OutputToStream(XPathDataNavigator xpdn, XmlTextWriter stream, HtmlTextWriter htmlWriter)
   at Infragistics.WebUI.UltraWebGrid.XPathDataNavigator.OutputToStream(XPathDataNavigator xpdn, XmlTextWriter stream, HtmlTextWriter htmlWriter)
   at Infragistics.WebUI.UltraWebGrid.XPathDataNavigator.OutputToStream(XPathDataNavigator xpdn, XmlTextWriter stream, HtmlTextWriter htmlWriter)
   at Infragistics.WebUI.UltraWebGrid.XPathDataNavigator.OutputToStream(XPathDataNavigator xpdn, XmlTextWriter stream, HtmlTextWriter htmlWriter)
   at Infragistics.WebUI.UltraWebGrid.XPathDataNavigator.WriteOuterXml(TextWriter stream)
   at Infragistics.WebUI.UltraWebGrid.RenderXmlGrid.WriteLayout(HtmlTextWriter writer, UltraGridLayout layout)
   at Infragistics.WebUI.UltraWebGrid.RenderXmlGrid.WriteHeader(HtmlTextWriter writer, UltraGridLayout layout)
   at Infragistics.WebUI.UltraWebGrid.RenderXmlGrid.WriteUltraWebGrid(HtmlTextWriter writer, UltraWebGrid grid, Boolean shouldWriteAll)
   at Infragistics.WebUI.UltraWebGrid.RenderXmlGrid.VisitObjects(HtmlTextWriter output)
   at Infragistics.WebUI.Shared.RendererBase.Render(HtmlTextWriter output)
   at Infragistics.WebUI.UltraWebGrid.GridRendererBase.Render(HtmlTextWriter output)
   at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Control.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Control.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Control.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  • 185
    Suggested Answer
    posted

    I found the issue.

    It stemmed from me using the CopyFrom function to copy a column from one band to another.

    I really just wanted to copy its properties.

    It must have generated an infinite loop somewhere.