I have a grid which uses advanced databinding to a collection of custom objects. My declaration is below. The grid exists in a pageview of a tab which is not selected by default. When I switch to the tab this grid is on, I get the following javascript error and the grid does not display:
a[d].get_visible is not a function
which points to line 1561 of the script resource:
when I switch tabs, I get a reference to the grid client-side and repaint. What is odd is, if I select the tab this grid is on by default, it binds and displays properly. It is only when the page loads with a different tab by default that this error occurs when I switch to this grid's tab. Anyhow, this page is fairly complicated, so I first wanted to see if you can tell from the error and what it is pointing to, what might be causing this error. I checked the datasource and it has 31 rows and data for each column in the grid declaration, so I don't think it is a data issue.
Grid Declaration:
a[d].get_visible is not a function
which points to line 1561 of the script resource:
var a=this._owner.get_masterTableView().get_columns();
for(var d in a){if(!a[d].get_visible()){this._owner.get_masterTableView().showColumn(d); //error is here
when I switch tabs, I get a reference to the grid client-side and repaint. What is odd is, if I select the tab this grid is on by default, it binds and displays properly. It is only when the page loads with a different tab by default that this error occurs when I switch to this grid's tab. Anyhow, this page is fairly complicated, so I first wanted to see if you can tell from the error and what it is pointing to, what might be causing this error. I checked the datasource and it has 31 rows and data for each column in the grid declaration, so I don't think it is a data issue.
Grid Declaration:
<telerik:RadGrid id="rgDataSCHX" runat="server" AutoGenerateColumns="False" Skin="Office2007" AllowSorting="False" AllowPaging="False" Height="100%" ShowFooter="False" > <MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" Width="100%" TableLayout="Fixed" UseAllDataFields="True" > <Columns> <telerik:GridBoundColumn HeaderStyle-Width="100px" HeaderText="Group" DataField="GroupName" /> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(#N)" DataField="PlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement Count"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(#D)" DataField="PlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement Pool"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(%)" DataField="PlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement %"/> <telerik:GridBoundColumn HeaderStyle-Width="60px" HeaderText="WA(#N)" DataField="WorkAssessmentPlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment Count"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="WA(#D)" DataField="WorkAssessmentPlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment Pool"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="WA(%)" DataField="WorkAssessmentPlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment %"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="CP(#N)" DataField="NonWorkPlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement Count"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="CP(#D)" DataField="NonWorkPlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement Pool"/> <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="C(%)" DataField="NonWorkPlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement %"/> </Columns> <CommandItemTemplate> </CommandItemTemplate> </MasterTableView> <ItemStyle BorderStyle="None" /> <GroupingSettings GroupByFieldsSeparator="" CaseSensitive="False" /> <ClientSettings AllowExpandCollapse="False"> <ClientEvents OnFilterMenuShowing="" /> <Selecting AllowRowSelect="False" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" FrozenColumnsCount="1" /> <Resizing AllowColumnResize="False" ClipCellContentOnResize="False" EnableRealTimeResize="False" ResizeGridOnColumnResize="True"/> </ClientSettings> <ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true" > <Excel Format="ExcelML" FileExtension="xls" /> </ExportSettings> </telerik:RadGrid>