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

[Solved] Help debugging error

3 Answers 149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Søren Hartig
Top achievements
Rank 2
Søren Hartig asked on 03 Sep 2009, 08:17 AM
Hi guys,

I wonder when you have an error like this, what is the best way to track it down to the exact RadComboBox in the Grid?

Message:  name is neither a DataColumn nor a DataRelation for table pv_contracts.

Trace:  at System.Data.DataRowView.get_Item(String property) at Telerik.Web.UI.PropertyDescriptorCache.GetPropertyValue(Object dataItem, String propertyName) at Telerik.Web.UI.PropertyDescriptorCache.GetPropertyValue(Object dataItem, String propertyName, String format) at Telerik.Web.UI.ControlItem.PopulateFromDataItem(PropertyDescriptorCache propertues, Object dataItem, String dataMember, Int32 depth) at Telerik.Web.UI.RadComboBoxItem.PopulateFromDataItem(PropertyDescriptorCache properties, Object dataItem, String dataMember, Int32 depth) at Telerik.Web.UI.ControlDataBinder.SetItemPropeties(ControlItem item, Object dataItem, String dataMember, Int32 depth) at Telerik.Web.UI.ControlDataBinder.BindItem(ControlItemCollection items, Object dataObject, Object dataItem, String dataMember, Int32 depth) at Telerik.Web.UI.ControlDataBinder.BindItem(ControlItemCollection items, Object dataItem, String dataMember, Int32 depth) at Telerik.Web.UI.ControlDataBinder.BindToEnumerableData(IEnumerable dataSource) at Telerik.Web.UI.ControlItemContainer.PerformDataBinding(IEnumerable data) at Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) at Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) at Telerik.Web.UI.RadComboBox.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at Telerik.Web.UI.GridDropDownListColumnEditor.DataBind() at Telerik.Web.UI.GridDropDownColumn.OnDataBindColumn(Object sender, GridCellDataBoundEventArgs args) at Telerik.Web.UI.GridCellDataBoundEvent.Invoke(Object sender, GridCellDataBoundEventArgs args) at Telerik.Web.UI.GridItem.OnCellDataBound(GridColumn column, TableCell cell) at Telerik.Web.UI.GridItem.CellsDataBound(GridColumn[] columns) at Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) at Telerik.Web.UI.GridItemBuilder.InitializeItem(Int32 dataSourceIndex, String& nextItemHierarchicalIndex, Boolean& itemIsInEditMode) at Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) at Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at Telerik.Web.UI.GridTableView.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at Telerik.Web.UI.GridTableView.DataBind() at Telerik.Web.UI.RadGrid.DataBind() at Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) at Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thank you.

Bruno Alexandre
(using Søren's account)


3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Sep 2009, 10:53 AM
Hi Bruno,

If you have any grid drop down columns or combo boxes inside templates you can try to comment/remove them temporary.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Søren Hartig
Top achievements
Rank 2
answered on 03 Sep 2009, 11:40 AM
Hi Vlad,

That would be the normal situation, but this is all dynamic, so, there is one page without any control and all controls are created from an XML file (design file).

Thing is that I can't figure it out what control ID is this, if I could see the ID I would point exactly to the correct one in the design and see what's wrong with it...

I was thinking , when I posted this that you probably had a way to invoke the id, somewhere, somehow :)
0
Sebastian
Telerik team
answered on 08 Sep 2009, 07:50 AM
Hello Bruno,

The error indicates that you do not have a column called 'name' in the table 'pv_contracts' which is referenced due to some reason to bind the data in your grid.

What you can do is remove the built-in GridDropDownColumns in your grid instance (from the XML source file) to see whether this eliminates the exception and then start adding them one by one to detect which causes the error and after that investigate why this happens.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Søren Hartig
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Søren Hartig
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or