Hi All,
I have been searching for a fix for this issue but I dont feel im getting very far.
I have a grid with a DetailTables/GridTableView to expand the rows.
The grid is bound to a list of objects, these objects has a property which is another list of objects which holds the 'Code' property.
This issue does not happen on our dev servers, only on the production server.
Markup
Error
Exception Details: System.Web.HttpException: DataBinding: 'Object' does not contain a property with the name 'Code'.
Anyone got any advice.
This happens as the grid/page loads.
Thanks
Ben
I have been searching for a fix for this issue but I dont feel im getting very far.
I have a grid with a DetailTables/GridTableView to expand the rows.
The grid is bound to a list of objects, these objects has a property which is another list of objects which holds the 'Code' property.
This issue does not happen on our dev servers, only on the production server.
Markup
<
telerik:radgrid
id
=
"grdData"
height
=
"400px"
width
=
"100%"
runat
=
"server"
pagesize
=
"50"
showstatusbar
=
"True"
allowmultirowselection
=
"False"
allowpaging
=
"True"
autogeneratecolumns
=
"False"
allowsorting
=
"true"
gridlines
=
"None"
cssclass
=
"gridControl"
onneeddatasource
=
"OnNeedDataSource"
ondetailtabledatabind
=
"RadGrid1_grdData"
onprerender
=
"grdStudentsData_PreRender"
>
<
pagerstyle
mode
=
"NumericPages"
></
pagerstyle
>
<
clientsettings
allowcolumnsreorder
=
"False"
reordercolumnsonclient
=
"False"
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
clientsettings
>
<
mastertableview
width
=
"98%"
summary
=
"Data"
clientdatakeynames
=
"PropertyA, PropertyB, PropertyC, PropertyD, PropertyE"
>
<
DetailTables
>
<
telerik:GridTableView
AutoGenerateColumns
=
"false"
DataKeyNames
=
"Code,DisplayValue"
Width
=
"100%"
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"DisplayValue"
Display
=
"True"
HeaderText
=
"Display Value"
ReadOnly
=
"True"
Reorderable
=
"True"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"DisplayValue"
Visible
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"Code"
Display
=
"True"
HeaderText
=
"Code"
ReadOnly
=
"True"
Reorderable
=
"False"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"Code"
Visible
=
"True"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"PropertyA"
Display
=
"True"
HeaderText
=
"PropertyA"
ReadOnly
=
"True"
Reorderable
=
"True"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"Entity"
Visible
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"PropertyB"
Display
=
"True"
HeaderText
=
"PropertyB"
ReadOnly
=
"True"
Reorderable
=
"False"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"CodeAttribute"
Visible
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"PropertyC"
Display
=
"True"
HeaderText
=
"PropertyC"
ReadOnly
=
"True"
Reorderable
=
"True"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"DescriptionAttribute"
Visible
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
AllowSorting
=
"False"
DataField
=
"PropertyD"
Display
=
"True"
HeaderText
=
"PropertyD"
ReadOnly
=
"True"
Reorderable
=
"True"
Resizable
=
"True"
ShowSortIcon
=
"False"
UniqueName
=
"OptionAttribute"
Visible
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
mastertableview
>
</
telerik:radgrid
>
Error
DataBinding: 'Object' does not contain a property with the name 'Code'.
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.Web.HttpException: DataBinding: 'Object' does not contain a property with the name 'Code'.
Stack Trace:
[HttpException (0x80004005): DataBinding: 'Object' does not contain a property with the name 'Code'.] System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +11394950 Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +409 [GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.] Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +1060 Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +411 Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1169 Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +873 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +274 Telerik.Web.UI.GridTableView.DataBind() +432 Telerik.Web.UI.GridDataItem.OnExpand() +461 Telerik.Web.UI.GridItem.set_Expanded(Boolean value) +295 Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) +46 System.Web.UI.Control.PreRenderRecursiveInternal() +113 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201 |
Anyone got any advice.
This happens as the grid/page loads.
Thanks
Ben