Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}
Hello,
We are implementing an OutlookGroupBy Functionality using the Infragistics Web Grid wherein we are trying to provide a default GroupBy Column on our grid given the following code placed in the Page_Load:
uwgPickList.Columns[5].SortIndicator = SortIndicator.Ascending;
uwgPickList.Columns[5].IsGroupByColumn = true;
The default group columns in the grid works fine. However when clicking a button or any functionality that performs an automatic postback in the page, the error “System.IndexOutOfRangeException: Cannot find column ." occurs. See attached image for additional information.
Thanks again.
Michael
Are you creating your columns dynamically in code? If so, the columns might not be stored in ViewState, so when the grid tries to recreate itself on your postback, it knows to group by a particular column, but that column isn't there.
If you're not adding your columns dynamically, then it's not clear what's happening. In such a case, I suggest that you submit a support request to Developer Support so that someone can research your situation more in-depth. If possible, please provide a sample project that we can run and debug which demonstrates the exception, so that we know we're testing the same code you are.
thanks for the reply, Vince.
I had resolved this problem by setting the DisplayLayout.LoadOnDemand from XML into Automatic. and also remove the event handler for InitializeDataSource of the Grid. It's because the Grouping control encounters an error whenever postback occurs and the InitializeDataSource event was reinvoked.
So by placing the code - uwgPickList.DisplayLayout.LoadOnDemand = LoadOnDemand.Automatic; and not subscribing the InitializeDataSource event fixes the error.