This is a migrated thread and some comments may be shown as answers.

[Solved] Extremely Frustrated Please Help with RadGrid Export of multi - tabe view

2 Answers 221 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 2
John asked on 13 Aug 2009, 06:05 PM
I have been trying to get the RadGrid to Export my multi table view into excel.  If I don't try and do multiple tables it exports fine.  I think I have finally gotten AJAX turned off and it is trying to export and I get an error that there is no ContractID which I think is because there isn't a child row for that parent and when I make sure that all the parent rows have child rows I get.

I have try catch blocks in every code block I have and this is never trapped.  I am going to have to switch to a different set of controls from another vendor if I can't make this work by end of day tomorrow.  

Thanks,

John

 

Server Error in '/' Application.

Syntax error: Missing operand before '=' operator.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing operand before '=' operator.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SyntaxErrorException: Syntax error: Missing operand before '=' operator.]
   System.Data.ExpressionParser.Parse() +4821928
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +121
   System.Data.DataView.set_RowFilter(String value) +153
   System.Data.LinqDataView.set_RowFilter(String value) +53
   Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +372
   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) +187
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +544
   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() +235
   Telerik.Web.UI.GridTableView.BindClone(GridTableView clone) +59
   Telerik.Web.UI.GridItemBuilder.BindDetailTable(GridDataItem parentItem, GridTableView cloned) +58
   Telerik.Web.UI.GridItemBuilder.BindDetailTables(GridDataItem parentItem, GridNestedViewItem detailItem) +144
   Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +1181
   Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +129
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +593
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +544
   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() +235
   Telerik.Web.UI.RadGrid.DataBind() +80
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2120
   Telerik.Web.UI.RadGrid.RebindForExport() +107
   Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport() +160
   Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e) +5
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8682870
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 17 Aug 2009, 04:22 PM
Hello John,

The most probable reason for this error is that one (or more) of your relation fields is NULL. Please try to hardcode the aforementioned fields and let me know whether this helps.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
John
Top achievements
Rank 2
answered on 19 Aug 2009, 01:35 PM
Actually you are right.  I was checking for wether a property was an empty string but not also wether it was a null.

Thanks for you help.

John    
Tags
Grid
Asked by
John
Top achievements
Rank 2
Answers by
Daniel
Telerik team
John
Top achievements
Rank 2
Share this question
or