Hi,
we are using a radgrid and randomly get the below error for the column used in GroupByExpressions. The column exists in the query and it works fine most of the time, but sometimes it throws the below error. I have gone through many forum posts but no avail. The try catch statements too dont handle the error and we get the yellow screen of death. we have posted the server log too below. We are using version 2014.1.403.45 of the controls.
Any help would be greatly appreciated.
aspx
Code
Server Error Log
we are using a radgrid and randomly get the below error for the column used in GroupByExpressions. The column exists in the query and it works fine most of the time, but sometimes it throws the below error. I have gone through many forum posts but no avail. The try catch statements too dont handle the error and we get the yellow screen of death. we have posted the server log too below. We are using version 2014.1.403.45 of the controls.
Any help would be greatly appreciated.
aspx
001.<telerik:RadGrid ID="radProject3" runat="server"002. AutoGenerateColumns="False"003. AllowSorting="True"004. AllowPaging="True"005. ShowFooter="True"006. ShowGroupPanel="true"007. AllowFilteringByColumn="False"008. EnableGroupsExpandAll="True"009. EnableHeaderContextMenu="true"010. EnableHeaderContextFilterMenu="False"011. CellSpacing="0"012. PageSize="25"013. >014. <ExportSettings HideStructureColumns="true"015. ExportOnlyData="true"016. IgnorePaging="true"017. OpenInNewWindow="true"018. FileName="TaskSheet"019. >020. <Csv RowDelimiter="Tab" />021. <Excel Format="Html" AutoFitImages="true" />022. <Pdf FontType="Link" ForceTextWrap="true" BorderColor="#000000" BorderStyle="Thin" BorderType="AllBorders" DefaultFontFamily="Arial" >023. <PageHeader>024. <LeftCell Text="" TextAlign="Left" />025. <RightCell Text="" TextAlign="Right" />026. </PageHeader>027. </Pdf>028. </ExportSettings>029. <MasterTableView DataKeyNames="FullJobNo, t_Briefno, t_BriefVersionNo, t_BriefRevisionNo"030. ClientDataKeyNames="FullJobNo, t_Briefno, t_BriefVersionNo, t_BriefRevisionNo"031. AllowMultiColumnSorting="True"032. EnableHierarchyExpandAll="true"033. GroupLoadMode="Server"034. Name="ARMPROJECT"035. FilterItemStyle-Height="10px"036. CommandItemDisplay="top"037. CommandItemStyle-Height="5px"038. >039. <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PageSizes="{20, 25, 50, 75, 100, 200, 250, 500, 750, 1000, 1000}"></PagerStyle>040. <GroupByExpressions>041. <telerik:GridGroupByExpression>042. <SelectFields>043. <telerik:GridGroupByField FieldName="assignedto" HeaderText="Assigned To" />044. </SelectFields>045. <GroupByFields>046. <telerik:GridGroupByField FieldName="assignedto" SortOrder="Ascending" />047. </GroupByFields>048. </telerik:GridGroupByExpression>049. </GroupByExpressions>050. <CommandItemSettings051. ShowExportToExcelButton="false"052. ShowRefreshButton="true"053. ShowAddNewRecordButton="false" />054. <Columns>055. <telerik:GridTemplateColumn DataField="Fav" GroupByExpression="Fav Group By Fav" UniqueName="Fav" HeaderText="Fav" SortExpression="Fav" ItemStyle-Width="16px" AllowFiltering="false" HeaderStyle-Width="16px">056. <ItemTemplate>057. <asp:ImageButton runat="server" ID="ImgFav" ImageUrl='<%# String.Format("~/images/icons/{0}", Eval("imgFav"))%>' Width="16px" Height="16px" />058. <asp:HiddenField runat="server" ID="hdnFav" Value='<%#Eval("Fav") %>' />059. <asp:HiddenField runat="server" ID="hdnIntRev" Value='<%#Eval("InternalReview1") %>' />060. <asp:HiddenField runat="server" ID="hdnClPr" Value='<%#Eval("ClientPresentation1") %>' />061. <asp:HiddenField runat="server" ID="hdnDead" Value='<%#Eval("Deadline1") %>' />062. </ItemTemplate>063. </telerik:GridTemplateColumn>064. <telerik:GridBoundColumn DataField="FavText" UniqueName="FavText" HeaderText="Fav" SortExpression="FavText" AllowFiltering="false" Visible="false" ItemStyle-Width="30px" HeaderStyle-Width="30px">065. <ColumnValidationSettings>066. <ModelErrorMessage Text=""></ModelErrorMessage>067. </ColumnValidationSettings>068. </telerik:GridBoundColumn>069. <telerik:GridBoundColumn DataField="FullJobNo" UniqueName="FullJobNo" HeaderText="Job No" SortExpression="FullJobNo" ItemStyle-Width="90px" AllowFiltering="false">070. <ColumnValidationSettings>071. <ModelErrorMessage Text=""></ModelErrorMessage>072. </ColumnValidationSettings>073. </telerik:GridBoundColumn>074. <telerik:GridTemplateColumn GroupByExpression="FullBriefNo Group By FullBriefNo" UniqueName="FullBriefNo" HeaderText="Brief No" SortExpression="FullBriefNo" AllowFiltering="false" ItemStyle-Width="70px">075. <ItemTemplate>076. <asp:Label runat="server" ID="lblFullBriefNoWithD" Text='<%#Eval("FullBriefNoWithD")%>' Width="70px"></asp:Label>077. <asp:Label runat="server" ID="lblFullBriefNo" Text='<%#Eval("FullBriefNo") %>' Visible="false"></asp:Label>078. <asp:HiddenField runat="server" ID="hdnCostCentreCode" Value='<%#Eval("t_costcentrecode") %>' />079. </ItemTemplate>080. </telerik:GridTemplateColumn>081. <telerik:GridBoundColumn DataField="t_BriefType" UniqueName="t_BriefType" HeaderText="Brief Type" SortExpression="t_BriefType" AllowFiltering="false">082. <ColumnValidationSettings>083. <ModelErrorMessage Text=""></ModelErrorMessage>084. </ColumnValidationSettings>085. </telerik:GridBoundColumn>086. <telerik:GridBoundColumn DataField="t_briefdescription" UniqueName="t_briefdescription" HeaderText="Brief Title" SortExpression="t_briefdescription" AllowFiltering="false"087. ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">088. <ColumnValidationSettings>089. <ModelErrorMessage Text=""></ModelErrorMessage>090. </ColumnValidationSettings>091. </telerik:GridBoundColumn>092. <telerik:GridBoundColumn DataField="t_jobdescription" UniqueName="t_jobdescription" HeaderText="Job Description" SortExpression="t_jobdescription" AllowFiltering="false"093. ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-width="200px">094. <ColumnValidationSettings>095. <ModelErrorMessage Text=""></ModelErrorMessage>096. </ColumnValidationSettings>097. </telerik:GridBoundColumn>098. <telerik:GridBoundColumn DataField="brieffeed" UniqueName="t_brieffeed" HeaderText="Feed" SortExpression="brieffeed" AllowFiltering="false">099. <ColumnValidationSettings>100. <ModelErrorMessage Text=""></ModelErrorMessage>101. </ColumnValidationSettings>102. </telerik:GridBoundColumn>103. <telerik:GridBoundColumn DataField="t_taskname" UniqueName="t_taskname" HeaderText="Task Name" SortExpression="t_taskname" AllowFiltering="false">104. <ColumnValidationSettings>105. <ModelErrorMessage Text=""></ModelErrorMessage>106. </ColumnValidationSettings>107. </telerik:GridBoundColumn>108. <telerik:GridBoundColumn DataField="assignedto" UniqueName="t_assignedto" HeaderText="Assigned To" SortExpression="assignedto" AllowFiltering="false">109. <ColumnValidationSettings>110. <ModelErrorMessage Text=""></ModelErrorMessage>111. </ColumnValidationSettings>112. </telerik:GridBoundColumn>113. <telerik:GridBoundColumn DataField="ClientName" UniqueName="ClientName" HeaderText="Client Name" SortExpression="ClientName" AllowFiltering="false">114. <ColumnValidationSettings>115. <ModelErrorMessage Text=""></ModelErrorMessage>116. </ColumnValidationSettings>117. </telerik:GridBoundColumn>118. <telerik:GridBoundColumn DataField="BrandName" UniqueName="BrandName" HeaderText="Brand Name" SortExpression="BrandName" AllowFiltering="false">119. <ColumnValidationSettings>120. <ModelErrorMessage Text=""></ModelErrorMessage>121. </ColumnValidationSettings>122. </telerik:GridBoundColumn>123. <telerik:GridTemplateColumn GroupByExpression="t_OriginalFileName Group By t_OriginalFileName" UniqueName="t_FileName" HeaderText="File Name" SortExpression="t_OriginalFileName"124. AllowFiltering="false"125. Exportable="false">126. <ItemTemplate>127. <%-- <asp:LinkButton runat="server" ID="lnkViewFile" OnClick="lnkViewFile_Click" Text='<%#Eval("t_FileName") %>'></asp:LinkButton>--%>128. <asp:Label runat="server" ID="lblViewFile" Text='<%#Eval("t_OriginalFileName")%>' Visible="true" ></asp:Label>129. </ItemTemplate>130. </telerik:GridTemplateColumn>131. <telerik:GridBoundColumn DataField="InternalReview" UniqueName="InternalReview" HeaderText="Internal Review" SortExpression="InternalReview1" AllowFiltering="false"132. HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">133. <ColumnValidationSettings>134. <ModelErrorMessage Text=""></ModelErrorMessage>135. </ColumnValidationSettings>136. </telerik:GridBoundColumn>137. <telerik:GridBoundColumn DataField="Deadline" UniqueName="Deadline" HeaderText="Deadline" SortExpression="Deadline1" AllowFiltering="false"138. HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">139. <ColumnValidationSettings>140. <ModelErrorMessage Text=""></ModelErrorMessage>141. </ColumnValidationSettings>142. </telerik:GridBoundColumn>143. <telerik:GridBoundColumn DataField="ClientPresentation" UniqueName="ClientPresentation" HeaderText="Client Presentation" SortExpression="ClientPresentation1" AllowFiltering="false"144. HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">145. <ColumnValidationSettings>146. <ModelErrorMessage Text=""></ModelErrorMessage>147. </ColumnValidationSettings>148. </telerik:GridBoundColumn>149. <telerik:GridBoundColumn DataField="t_UploadedBy" UniqueName="t_UploadedBy" HeaderText="Created By" SortExpression="t_UploadedBy" AllowFiltering="false">150. <ColumnValidationSettings>151. <ModelErrorMessage Text=""></ModelErrorMessage>152. </ColumnValidationSettings>153. </telerik:GridBoundColumn>154. <telerik:GridBoundColumn DataField="t_UploadedOn" UniqueName="t_UploadedOn" HeaderText="Created Date" SortExpression="t_UploadedOn" DataFormatString="{0:dd-MM-yyyy HH:mm:ss}" AllowFiltering="false" ItemStyle-Width="110px">155. <ColumnValidationSettings>156. <ModelErrorMessage Text=""></ModelErrorMessage>157. </ColumnValidationSettings>158. </telerik:GridBoundColumn>159. <telerik:GridBoundColumn DataField="t_ApprovalStatus" UniqueName="t_ApprovalStatus" HeaderText="Brief Status" SortExpression="t_ApprovalStatus" AllowFiltering="false">160. <ColumnValidationSettings>161. <ModelErrorMessage Text=""></ModelErrorMessage>162. </ColumnValidationSettings>163. </telerik:GridBoundColumn>164. <telerik:GridBoundColumn DataField="t_flowstatusname" UniqueName="t_flowstatusname" HeaderText="Flow Status" SortExpression="t_flowstatusname" AllowFiltering="false">165. <ColumnValidationSettings>166. <ModelErrorMessage Text=""></ModelErrorMessage>167. </ColumnValidationSettings>168. </telerik:GridBoundColumn>169. <telerik:GridBoundColumn DataField="CreativeDirectorName" UniqueName="t_CreativeDirectorCode" HeaderText="Creative Director" SortExpression="CreativeDirectorName" AllowFiltering="false">170. <ColumnValidationSettings>171. <ModelErrorMessage Text=""></ModelErrorMessage>172. </ColumnValidationSettings>173. </telerik:GridBoundColumn>174. <telerik:GridBoundColumn DataField="taskstatus" UniqueName="taskstatus" HeaderText="Status" SortExpression="taskstatus" AllowFiltering="false">175. <ColumnValidationSettings>176. <ModelErrorMessage Text=""></ModelErrorMessage>177. </ColumnValidationSettings>178. </telerik:GridBoundColumn>179. </Columns>180. </MasterTableView>181. 182. <ClientSettings AllowDragToGroup="true" AllowColumnsReorder="true"183. ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder">184. <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True"185. AllowColumnResize="True" ClipCellContentOnResize="false" AllowResizeToFit="true" />186. <ClientEvents OnRowDblClick="RowDblClick"187. OnRowContextMenu="RowContextMenu" />188. </ClientSettings>189. <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>190. </telerik:RadGrid>Code
01.Private Sub radProject_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles radProject3.NeedDataSource02. Try03. Dim dsData As DataSet = New DataSet04. dsData = LoadBrief()05. radProject3.DataSource = dsData06. Catch ex As Exception07. 08. End Try09. End SubServer Error Log
01.Exception information: 02. Exception type: ArgumentException 03. Exception message: Column 'assignedto' does not belong to table Table.04. at System.Data.DataRow.GetDataColumn(String columnName)05. at System.Data.DataRow.get_Item(String columnName)06. at lambda_method(Closure , DataRowView )07. at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)08. at System.Linq.GroupedEnumerable`3.GetEnumerator()09. at System.Linq.Buffer`1..ctor(IEnumerable`1 source)10. at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()11. at Telerik.Web.UI.GridLinqGroupingHelper.CreateAllGroups(IEnumerable enumerable, List`1 groupFields, GridGroup parentGroup, Int32 level)12. at Telerik.Web.UI.GridLinqGroupingHelper.GetGroupedItemsForCurrentPage(IQueryable queryable)13. at Telerik.Web.UI.GridDataTableFromEnumerable.FillData35()14. at Telerik.Web.UI.GridDataTableFromEnumerable.FillData()15. at Telerik.Web.UI.GridResolveEnumerable.Initialize()16. at Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized()17. at Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)18. at Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)19. at Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)20. at Telerik.Web.UI.GridTableView.get_ResolvedDataSource()21. at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)22. at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)23. at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)24. at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)25. at System.Web.UI.WebControls.DataBoundControl.PerformSelect()26. at Telerik.Web.UI.GridTableView.PerformSelect()27. at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()28. at Telerik.Web.UI.GridTableView.DataBind()29. at Telerik.Web.UI.RadGrid.DataBind()30. at Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)31. at Telerik.Web.UI.RadGrid.OnLoad(EventArgs e)32. at System.Web.UI.Control.LoadRecursive()33. at System.Web.UI.Control.LoadRecursive()34. at System.Web.UI.Control.LoadRecursive()35. at System.Web.UI.Control.LoadRecursive()36. at System.Web.UI.Control.LoadRecursive()37. at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)