An unhandled exception

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Good afternoon
I work with the French pack in Administrator on version 1.4.
An error occurs in customer management. In the tab order client when I click on details this message appears error:

---
[HttpException (0x80004005): Impossible de trouver un champ ou une propriété 'Quantite' dans la source de données sélectionnée.]
   System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer) +1615227
   System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e) +64
   System.Web.UI.Control.OnDataBinding(EventArgs e) +99
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +155
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +2417
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +14
   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
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.WebControls.GridView.DataBind() +4
   NopSolutions.NopCommerce.Web.Administration.Modules.OrderDetailsControl.BindProductInfo(Order order) in C:\Documents and Settings\Administrator\Desktop\nopCommerce_1.40\NopCommerceStore\Administration\Modules\OrderDetails.ascx.cs:277
   NopSolutions.NopCommerce.Web.Administration.Modules.OrderDetailsControl.BindData() in C:\Documents and Settings\Administrator\Desktop\nopCommerce_1.40\NopCommerceStore\Administration\Modules\OrderDetails.ascx.cs:90
   NopSolutions.NopCommerce.Web.Administration.Modules.OrderDetailsControl.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\Desktop\nopCommerce_1.40\NopCommerceStore\Administration\Modules\OrderDetails.ascx.cs:490
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   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.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--
Please help me
Thank you
Eric
14 years ago
Your error is caused by a reported bug with the 'Quantity' BoundField in the OrderDetails control (the localized text is being used for the DataField value instead of for the HeaderText).

You can fix it by editing file: \Administration\Modules\OrderDetails.ascx (lines 435 - 437)

change from:
<asp:BoundField DataField="<% $NopResources:Admin.OrderDetails.Products.Quantity %>"
    HeaderText="Quantity" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%"
    ItemStyle-HorizontalAlign="Center"></asp:BoundField>

to:
<asp:BoundField HeaderText="<% $NopResources:Admin.OrderDetails.Products.Quantity %>"
    DataField="Quantity" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%"
    ItemStyle-HorizontalAlign="Center"></asp:BoundField>


Save the file and reload the web page (no need to recompile).

.
14 years ago
Thank you
Eric
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.