Hi,
When there are more than 440 number of columns in a Web Grid, the UI rendering fails as there is an Int32 limit that is passed.Is there hot fix for this problem?
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Parameter name: value] System.Web.UI.WebControls.Unit..ctor(Int32 value) +1153178 System.Web.UI.WebControls.Unit.Pixel(Int32 n) +23 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderHeaderStationary() +2002 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderHeadingArea() +172 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.RenderTableFrame() +2270 Infragistics.WebUI.UltraWebGrid.RenderDHTMLGrid.VisitObjects(HtmlTextWriter output) +1063 Infragistics.WebUI.Shared.RendererBase.Render(HtmlTextWriter output) +16 Infragistics.WebUI.UltraWebGrid.GridRendererBase.Render(HtmlTextWriter output) +477 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.Render(HtmlTextWriter output) +336 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
regards,
Rajiv.
Hello,
While there is no technical limit of the number of columns the grid supports, HTML pages in general are designed in such a way that this number of columns would be handled very poorly by the browser. I suspect that the error you are getting is because the actual width of all the columns exceeds the Int32 used for calculating that (and Unit.Pixel does not allow more that Int32 signed), but in all cases a grid with this number of columns would not perform great.
I recommend going through the following forum thread:
How to optimize WebGrid with large number of Columns ?
http://forums.infragistics.com/forums/p/14363/53413.aspx#53413
and follow some of the advices there. Another idea would be to limit the number of columns and use DetailsView to show all the information on row click.
I went through the thread. The scenario I have requires the columns to be shown and the columns are auto generated. Is there a reason why there is a Int32 in use rather than a Long or Int64 in that constructor? The performance is not an issue on rendering as 440 columns did respond well.
In essense what I am trying to say is that there is no preset limit in column number, it is just that their total width cannot be more that Int32 signed. Moreover, this type of interface (hundreds of columns) is typically discouraged in web interfaces.