Hello,
I've been trying to work my head around why i receive the following error:
Exception Details: Telerik.Web.UI.GridGroupByException: Field Location not found in the source table. Please check the expression syntax.
In my code the grid is dynamically bound to an XML datasource, so the column names are not constant and change from report to report, but in my current report the "Location" column is supposed to be grouped so that the group footer will display the sum of another column.
Which leads to the folowing error:
[GridGroupByException: Field Location not found in the source table. Please check the expression syntax.]
Telerik.Web.UI.GridDataSetHelper.CreateGroupByTable(DataTable SourceTable, GridTableView view) +376
Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +2698
Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +21
Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +105
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +169
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +499
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
Telerik.Web.UI.GridTableView.PerformSelect() +4
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
Telerik.Web.UI.GridTableView.DataBind() +238
Telerik.Web.UI.RadGrid.DataBind() +80
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2122
Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +121
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
I know the Location column is present in the data, and I can use the drag up to group feature when the code segment is removed, but I really need it to just do it by itself.
I've been trying to work my head around why i receive the following error:
Exception Details: Telerik.Web.UI.GridGroupByException: Field Location not found in the source table. Please check the expression syntax.
In my code the grid is dynamically bound to an XML datasource, so the column names are not constant and change from report to report, but in my current report the "Location" column is supposed to be grouped so that the group footer will display the sum of another column.
- The grid is loaded with data on the NeedDataSource function, where a data table is converted to a dataview and sorted.
- After the datasource has been set an event lister is added to the grid to listen for ColumnCreated.
- In the ColumnCreated function it listens for the creation of the column that needs to be summed, add the neccessary infomation for the row to sum.
- Right after adding the sum information the following code block is used to add the grouping:
| GridGroupByExpression ge = new GridGroupByExpression(); |
| GridGroupByField gf = new GridGroupByField(); |
| gf.FieldName = "Location"; |
| ge.SelectFields.Add(gf); |
| this.RadGrid1.MasterTableView.GroupByExpressions.Add(ge); |
[GridGroupByException: Field Location not found in the source table. Please check the expression syntax.]
Telerik.Web.UI.GridDataSetHelper.CreateGroupByTable(DataTable SourceTable, GridTableView view) +376
Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +2698
Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +21
Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +105
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +169
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +499
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
Telerik.Web.UI.GridTableView.PerformSelect() +4
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
Telerik.Web.UI.GridTableView.DataBind() +238
Telerik.Web.UI.RadGrid.DataBind() +80
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2122
Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +121
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
I know the Location column is present in the data, and I can use the drag up to group feature when the code segment is removed, but I really need it to just do it by itself.