Client keeps getting random exceptions:
C#System.Web.HttpException: DataBinding: 'DevExpress.Web.Data.WebDataRow' does not contain a property with the name 'INPROFILSysRef'.
Generated: Tue, 14 Jul 2015 11:11:02 GMT
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException: DataBinding: 'DevExpress.Web.Data.WebDataRow' does not contain a property with the name 'INPROFILSysRef'.
at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName)
at System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts)
at ASP.shoptoshoptransfers_createshoptoshoptransfer_aspx.__DataBinding__control17(Object sender, EventArgs e)
at DevExpress.Web.Internal.DataHelper.PerformSelect()
at DevExpress.Web.Internal.DataContainer.PerformSelect()
at DevExpress.Web.ASPxDataWebControlBase.DataBindInternal()
at DevExpress.Web.ASPxWebControl.DataBind()
at DevExpress.Web.ASPxComboBox.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at DevExpress.Web.GridViewBaseTemplateContainer.DataBind()
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControlBase.DataBindContainers(Control parent, Boolean bindContents, Boolean bindTemplates)
at DevExpress.Web.ASPxWebControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.
PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
… And I'm not too sure why it does this.
The Column:
ASPx<dx:GridViewDataTextColumn
Caption="Product"
FieldName="INPROFILDescription" >
<EditItemTemplate>
<dx:ASPxComboBox
ID="cbProduct"
runat="server"
EnableCallbackMode="true"
CallbackPageSize="10"
KeyFieldName="SYSREF"
OnInit="ddlProduct_OnInit"
SelectionMode="Single"
ValueType="System.Decimal"
ValueField="SYSREF"
OnItemsRequestedByFilterCondition="ASPxComboBox1_OnItemsRequestedByFilterCondition"
OnItemRequestedByValue="ASPxComboBox1_OnItemRequestedByValue"
Value='<%# Bind("INPROFILSysRef") %>'
IncrementalFilteringMode="Contains"
Width="100%"
DropDownWidth="800"
TextFormatString="{0} - {1} ({2})"
DropDownStyle="DropDownList">
<ClientSideEvents
EndCallback=" function(s, e) {
if (s.GetItemCount() == 1) {
s.SetValue(s.GetItem(0).value);
s.HideDropDown();
}
}"
KeyDown="function(s, e) {
e = window.event;
if (e.which == 17 || e.which == 74 || e.keyCode == 13)
{
e.preventDefault();
}
}"/>
<Columns>
<dx:ListBoxColumn FieldName="SYSREF" Visible="False" />
<dx:ListBoxColumn FieldName="CODE" Caption="Code" Width="100" />
<dx:ListBoxColumn FieldName="DESC1" Caption="Description" Width="200"/>
<dx:ListBoxColumn FieldName="BARCODES" Caption="Barcode" Width="350"/>
</Columns>
</dx:ASPxComboBox>
</EditItemTemplate>
</dx:GridViewDataTextColumn>
These seem to happen very randomly as the page is used a lot. And I haven't been able to replicate locally.
Hello Christopher,
The issue may occur if your ASPxGridView is bound at runtime. I see that you're using ASPxComboBox with server-side events. It may force building ASPxGridView hierarchy earlier than the DataSource property is assigned (ASPxGridView isn't bound yet). Please make sure that the DataSource property is defined on each round trip to the server either in the Page.Init event handler or in the ASPxGridView.DataBinding event handler (see Why might paging (sorting, grouping, filtering) not work in the ASPxGridView?).
If this doesn't help, send us a full ASPxGridView markup and code snippets illustrating how it bound to data, so we can perform more detail research.
Thanks,
Artem
At the moment, the GridView is always bound - inside the Page_Load however.
Thanks for the clarification. Please change the binding logic as I suggested above and check if the issue persists.
Will do. Thank you.
Seems to be ok. No other reports of this happening.
It's great to hear that the issue has been resolved. Should you have further questions, feel free to contact us.