When i edit a record it's giving me an error when i press the Update button. I made sure i have the key set right so i'm not sure what's going on. here's the exception message when dubugging:
System.Reflection.TargetInvocationException occurred
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
InnerException: System.NullReferenceException
Message=Object reference not set to an instance of an object.
Source=System.Web
StackTrace:
at System.Web.UI.Page.get_Title()
InnerException:
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Here's the ASPX code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Invoice.aspx.vb" Inherits="Application.Invoice" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1.Linq, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Data.Linq" tagprefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>XXX Invoice</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="0" cellspacing="0"> <tr><td colspan="2" width="100%"> <!--#include file="Include\incTopNav.aspx"--></td></tr><tr><td width="170"> <!--#include file="Include\incLeftNav.aspx"--></td>
<td width="100%" valign="top">
<dx:ASPxGridView ID="ASPxGridViewInvoice" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqServerModeDataSource1" KeyFieldName="InvoiceID">
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<EditButton Visible="True">
</EditButton>
<NewButton Visible="True">
</NewButton>
<DeleteButton Visible="True">
</DeleteButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="InvoiceID" ReadOnly="True"
VisibleIndex="1">
</dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn FieldName="InvoiceDate" VisibleIndex="2">
</dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn FieldName="InvoiceAmount" VisibleIndex="3">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="QuoteID" VisibleIndex="4">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="Status" VisibleIndex="5">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="CustomerID" VisibleIndex="6">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="ContactName" VisibleIndex="7">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="ContactEmail" VisibleIndex="8">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="CoordinatorsQuantity" VisibleIndex="9">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="DriversQuantity" VisibleIndex="10">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="E991Quantity" VisibleIndex="11">
</dx:GridViewDataTextColumn>
</Columns>
<Settings ShowFilterBar="Visible" ShowFilterRow="True" />
</dx:ASPxGridView>
<dx:LinqServerModeDataSource ID="LinqServerModeDataSource1" runat="server"
ContextTypeName="Application.DataClasses1DataContext" EnableDelete="True"
EnableInsert="True" EnableUpdate="True" TableName="Invoices">
</dx:LinqServerModeDataSource>
</td>
</tr></table>
</div>
</form>
</body>
</html>
Hello Mike,
I would like to note that the error message you sent is thrown on the server side. Thus, the markup does not allow us to diagnostic the cause of this issue. Please provide us with a sample working project (containing only the problematic ASPxGridView bound with any portable datasource) that illustrates the problem. We will do our best to help you.
In addition, you can catch the exception yourself. For this, adjust VS.NET as shown below:
Thanks,
Marion