I'm getting the following error below. Can anyone suggest where I should begin looking for the error that is eliciting this message or is this indigenous to the Infragistics UltraWebGrid? And if indigenous to the UWG, is there a fix available?
TIA!Justin
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[IndexOutOfRangeException: Index was outside the bounds of the array.] Infragistics.WebUI.UltraWebGrid.HeadersCollection.Render(StringBuilder res, GridRendererBase r, String indent) +86 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderColumnsHeaders(StringBuilder res, UltraGridBand band, String indent) +11632 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderBandsArray() +843 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderPostJavaScript(String extraParam) +1402 Infragistics.WebUI.UltraWebGrid.RenderXmlGrid.VisitObjects(HtmlTextWriter output) +807 Infragistics.WebUI.Shared.RendererBase.Render(HtmlTextWriter output) +36 Infragistics.WebUI.UltraWebGrid.GridRendererBase.Render(HtmlTextWriter output) +381 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.Render(HtmlTextWriter output) +447 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20 System.Web.UI.Control.Render(HtmlTextWriter writer) +7 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20 System.Web.UI.Control.Render(HtmlTextWriter writer) +7 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22 Infragistics.WebUI.UltraWebTab.DhtmlRenderer.RenderContent(Boolean tr, String noBorder) +2867 Infragistics.WebUI.UltraWebTab.DhtmlRenderer.RenderControl() +2203 Infragistics.WebUI.UltraWebTab.RendererBase.VisitObjects(HtmlTextWriter output) +125 Infragistics.WebUI.Shared.RendererBase.Render(HtmlTextWriter output) +36 Infragistics.WebUI.UltraWebTab.UltraWebTab.Render(HtmlTextWriter output) +685 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20 System.Web.UI.Page.Render(HtmlTextWriter writer) +26 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
You might have to post some code. But... off the top of my head - check how you are referencing your rows and columns. I think they are both zero based. For example, if you have a 5 column grid and reference the fifth column with index 5, you would get this error. The 5th column is index 4.
I've also made this mistake when looping through the columns by using ...columns.count as the upper end of my For Next. ...columns.count -1 works though.
Good luck.
Hey, thanks for the reply.
It doesn't appear to be a result of any loops, since we are using "for each" statements instead of "for" loops, so we never have to loop based on explicit indices.
The problem appears to have something to do with trying to reference the second band (i.e. UltraWebGrid.Bands(1) )
The bands were initially created through the Infragistics Quick Design UI. Referencing UltraWebGrid.Bands(0) doesn't seem to be a problem, but referencing UltraWebGrid.Bands(1) seems to elicit the indexing error, as though the second band doesn't exist. Correct me if I'm wrong, but I think I'm deducing that additional bands (other than UltraWebGrid.Bands(0) ) need to be created programmatically in order to avoid this problem...??