Solved

DropDownList1' has a SelectedValue which is invalid

Posted on 2008-10-05
12
2,111 Views
Last Modified: 2013-12-17
Hello Experts,

This error is driving me crazy!!!!

*DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value*

help please
(I hate deadlines :-( )
please find my code attached..

I also want to filter town by state and postcode by town how do i acheive this???

Kind regards

Trent
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="customers_data_0_details.ascx.cs"

    Inherits="WebApplication2.Controls.Customers.customers_data_0_details" %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="CustomerID"

    DataSourceID="SqlDataSource1" Height="50px">

    <Fields>

        <asp:CommandField ShowEditButton="True" ShowInsertButton="True" ValidationGroup="CustDetails" />

        <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" InsertVisible="False"

            ReadOnly="True" SortExpression="CustomerID" />

        <asp:TemplateField HeaderText="Title" SortExpression="Title">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="title" DataTextField="Title" DataValueField="TitleID" 

                    SelectedValue='<%# Bind("TitleID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DropDownList1"

                    ErrorMessage="Title" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

                <asp:SqlDataSource ID="title" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

                    SelectCommand="SELECT [TitleID], [Title] FROM [customers_lut_corr_mail_title]">

                </asp:SqlDataSource>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="titlei" DataTextField="Title" DataValueField="TitleID" 

                    SelectedValue='<%# Bind("TitleID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DropDownList2"

                    ErrorMessage="Title" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

                <asp:SqlDataSource ID="titlei" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

                    SelectCommand="SELECT [TitleID], [Title] FROM [customers_lut_corr_mail_title]">

                </asp:SqlDataSource>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Mailing Name" SortExpression="Mailing_Name">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox1" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Mailing_Name") %>'

                    ValidationGroup="CustDetails" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="RadTextBox1"

                    EnableTheming="True" ErrorMessage="Mailing Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox2" runat="server" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Mailing_Name") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="RadTextBox2"

                    ErrorMessage="Mailing Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Mailing_Name") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Name Contact" SortExpression="Name_Contact">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox3" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Name_Contact") %>'

                    ValidationGroup="CustDetails" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="RadTextBox3"

                    ErrorMessage="Contact Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox4" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Name_Contact") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="RadTextBox4"

                    ErrorMessage="Contact Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Name_Contact") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="First Name" SortExpression="Name_First">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox7" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    SelectionOnFocus="SelectAll" Skin="Vista" ValidationGroup="CustDetails" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadTextBox7"

                    ErrorMessage="First Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox8" runat="server" AutoPostBack="True" EmptyMessage="Enter Text Here"

                    Skin="Vista" ValidationGroup="CustDetails" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="RadTextBox8"

                    ErrorMessage="First Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Name_First") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Last Name" SortExpression="Name_Last">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox10" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Name_Last") %>'

                    ValidationGroup="CustDetalis" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="RadTextBox10"

                    ErrorMessage="Last Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox9" runat="server" CausesValidation="True" EmptyMessage="Enter Text Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Name_Last") %>'

                    ValidationGroup="CustDetails" Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="RadTextBox9"

                    ErrorMessage="Last Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Name_Last") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Busines Phone#" SortExpression="Phone_Business">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox11" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Phone_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="RadTextBox11"

                    ErrorMessage="Business Phone Number" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox12" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Phone_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="RadTextBox12"

                    ErrorMessage="Business Phone Number" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label6" runat="server" Text='<%# Eval("Phone_Business") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Private Phone#" SortExpression="Phone_Private">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox13" runat="server" EmptyMessage="Enter Phone Number Here"

                    SelectionOnFocus="SelectAll" Skin="Vista" Text='<%# Bind("Phone_Private") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="RadTextBox13"

                    ErrorMessage="Private Phone Number" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox14" runat="server" EmptyMessage="Enter Phone Number Here"

                    Skin="Vista" Text='<%# Bind("Phone_Private") %>' Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="RadTextBox14"

                    ErrorMessage="Private Phone Number" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label7" runat="server" Text='<%# Eval("Phone_Private") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Mobile Phone#" SortExpression="Mobile_Business">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox15" runat="server" EmptyMessage="Enter Phone Number Here"

                    Skin="Vista" Text='<%# Bind("Mobile_Business") %>' Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="RadTextBox15"

                    ErrorMessage="Mobile Phone" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox16" runat="server" EmptyMessage="Enter Phone Number Here"

                    Skin="Vista" Text='<%# Bind("Mobile_Business") %>' Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ControlToValidate="RadTextBox16"

                    ErrorMessage="Mobile Phone" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label8" runat="server" Text='<%# Eval("Mobile_Business") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Fax#" SortExpression="Fax_Business">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox18" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Fax_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="RadTextBox18"

                    ErrorMessage="Fax" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox17" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Fax_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ControlToValidate="RadTextBox17"

                    ErrorMessage="Fax" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label9" runat="server" Text='<%# Eval("Fax_Business") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Email address" SortExpression="Email_Business">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox19" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Email_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ControlToValidate="RadTextBox19"

                    ErrorMessage="E-mail" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox20" runat="server" EmptyMessage="Enter Phone Number Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Email_Business") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ControlToValidate="RadTextBox20"

                    ErrorMessage="E-mail" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label10" runat="server" Text='<%# Eval("Email_Business") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Postal Address" SortExpression="Postal_Address">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox21" runat="server" EmptyMessage="Enter Address Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Postal_Address") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" ControlToValidate="RadTextBox21"

                    ErrorMessage="Address" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox22" runat="server" EmptyMessage="Enter Address Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Postal_Address") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="RadTextBox22"

                    ErrorMessage="Address" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label11" runat="server" Text='<%# Eval("Postal_Address") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Postal Address line 2" SortExpression="Postal_Address_Line2">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox23" runat="server" EmptyMessage="Enter Address Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Postal_Address_Line2") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ControlToValidate="RadTextBox23"

                    ErrorMessage="Address 2" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox24" runat="server" EmptyMessage="Enter Address Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Postal_Address_Line2") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="RadTextBox24"

                    ErrorMessage="Address 2" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label12" runat="server" Text='<%# Eval("Postal_Address_Line2") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="P.O.Box" SortExpression="POBox">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox25" runat="server" EmptyMessage="Enter POBox Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("POBox") %>' Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" ControlToValidate="RadTextBox25"

                    ErrorMessage="POBox" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox26" runat="server" EmptyMessage="Enter POBox Here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("POBox") %>' Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" ControlToValidate="RadTextBox26"

                    ErrorMessage="POBox" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label13" runat="server" Text='<%# Eval("POBox") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Town" SortExpression="LocationID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="Town" DataTextField="Locality" DataValueField="LocationID" 

                    SelectedValue='<%# Bind("LocationID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" ControlToValidate="DropDownList3"

                    ErrorMessage="Town" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList4" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="Town" DataTextField="Locality" DataValueField="LocationID" 

                    SelectedValue='<%# Bind("LocationID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" ControlToValidate="DropDownList4"

                    ErrorMessage="Town" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label14" runat="server" Text='<%# Eval("Locality") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="State" SortExpression="StateID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList5" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="state" DataTextField="State" DataValueField="StateID" 

                    SelectedValue='<%# Bind("StateID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" ControlToValidate="DropDownList5"

                    ErrorMessage="State" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList6" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="state" DataTextField="State" DataValueField="StateID" 

                    SelectedValue='<%# Bind("StateID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator29" runat="server" ControlToValidate="DropDownList6"

                    ErrorMessage="State" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label15" runat="server" Text='<%# Eval("State") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Postcode" SortExpression="PostCodeID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList7" runat="server" DataSourceID="Postcode" 

                    DataTextField="PostCode" DataValueField="PID" 

                    SelectedValue='<%# Bind("PostCodeID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator30" runat="server" ErrorMessage="Postcode"

                    ControlToValidate="DropDownList7" SetFocusOnError="True" 

                    ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList8" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="Postcode" DataTextField="PostCode" DataValueField="PID" 

                    SelectedValue='<%# Bind("PostCodeID") %>'>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator31" runat="server" ErrorMessage="PostCode"

                    ControlToValidate="DropDownList8" SetFocusOnError="True" 

                    ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label16" runat="server" Text='<%# Eval("PostCode") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Latitude" SortExpression="Latitude">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox27" runat="server" EmptyMessage="Enter Latitude here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind ("Latitude") %>'

                    Width="200px">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox28" runat="server" EmptyMessage="Enter Latitude here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind ("Latitude") %>'

                    Width="200px">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label17" runat="server" Text='<%# Eval ("Latitude") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Longitude" SortExpression="Longtitude">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox30" runat="server" EmptyMessage="Enter Longtitude here"

                    Skin="Vista" Text='<%# Bind ("Longtitude") %>' Width="200px" LabelCssClass="radLabelCss_Vista">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox29" runat="server" EmptyMessage="Enter Longtitude here"

                    Skin="Vista" Text='<%# Bind ("Longtitude") %>' Width="200px" LabelCssClass="radLabelCss_Vista">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label18" runat="server" Text='<%# Eval ("Longtitude") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Entity Name" SortExpression="Name_Entity">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox31" runat="server" EmptyMessage="Enter Entity Name here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind ("Name_Entity") %>'

                    Width="300px">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox32" runat="server" EmptyMessage="Enter Longtitude here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind ("Name_Entity") %>'

                    Width="300px">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label19" runat="server" Text='<%# Eval ("Name_Entity") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Entity Type" SortExpression="EntityTypeID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList9" runat="server" AppendDataBoundItems="True" 

                    DataSourceID="Entity" DataTextField="EntityType" DataValueField="EntityTypeID" 

                    SelectedValue='<%# Bind("EntityTypeID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList10" runat="server" 

                    AppendDataBoundItems="True" DataSourceID="Entity" DataTextField="EntityType" 

                    DataValueField="EntityTypeID" SelectedValue='<%# Bind("EntityTypeID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label20" runat="server" Text='<%# Eval("EntityType") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="ABN" SortExpression="ABN">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox34" runat="server" EmptyMessage="Enter ABN here"

                    Skin="Vista" Text='<%# Bind("ABN") %>' Width="125px">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox33" runat="server" EmptyMessage="Enter ABN here"

                    Skin="Vista" Text='<%# Bind("ABN") %>' Width="125px">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label21" runat="server" Text='<%# Eval("ABN") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="ACN" SortExpression="ACN">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox35" runat="server" EmptyMessage="Enter ACN here"

                    Skin="Vista" Text='<%# Bind("ACN") %>' Width="125px">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox36" runat="server" EmptyMessage="Enter ACN here"

                    Skin="Vista" Text='<%# Bind("ACN") %>' Width="125px">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label22" runat="server" Text='<%# Eval("ACN") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="ABN Status Check Date" SortExpression="ABNStatusDate">

            <EditItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker2" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "ABNStatusDate") %>'>

                    <Calendar ID="Calendar2" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker4" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "ABNStatusDate") %>'>

                    <Calendar ID="Calendar4" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label23" runat="server" Text="Label"></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Legal Trading Name" SortExpression="Name_LegalTrading">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox37" runat="server" EmptyMessage="Enter Legal Trading Name here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("Name_LegalTrading") %>'

                    Width="300px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator33" runat="server" ControlToValidate="RadTextBox37"

                    ErrorMessage="Legal Trading Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox38" runat="server" EmptyMessage="Enter Legal Trading Name here"

                    Skin="Vista" Text='<%# Bind("Name_LegalTrading") %>' Width="300px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator32" runat="server" ControlToValidate="RadTextBox38"

                    ErrorMessage="Legal Trading Name" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label24" runat="server" Text='<%# Eval("Name_LegalTrading") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="# of Trading names" SortExpression="TradingNameCount">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox40" runat="server" EmptyMessage="Enter how many trading names"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("TradingNameCount") %>'

                    Width="200px">

                </telerik:RadTextBox>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox39" runat="server" EmptyMessage="Enter how many trading names"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("TradingNameCount") %>'

                    Width="200px">

                </telerik:RadTextBox>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label25" runat="server" Text='<%# Eval("TradingNameCount") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:BoundField DataField="GST_Reg" HeaderText="GST Registered" SortExpression="GST_Reg" />

        <asp:TemplateField HeaderText="Last GST Reg Check Date" SortExpression="GSTStatusDate">

            <EditItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker4" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "GSTStatusDate") %>'>

                    <Calendar ID="Calendar2" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker5" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "GSTStatusDate") %>'>

                    <Calendar ID="Calendar1" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label26" runat="server" Text='<%# Eval("GSTStatusDate") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Date ATO Records where last modified" SortExpression="LastModifiedDate">

            <EditItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker6" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "LastModifiedDate") %>'>

                    <Calendar Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker7" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "LastModifiedDate") %>'>

                    <Calendar ID="Calendar3" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label27" runat="server" Text='<%# Eval("LastModifiedDate") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:CheckBoxField DataField="GroupIS" HeaderText="Is this customer a group" SortExpression="GroupIS" />

        <asp:TemplateField HeaderText="Group Type" SortExpression="GroupTypeID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList11" runat="server" 

                    AppendDataBoundItems="True" DataSourceID="group" DataTextField="GroupType" 

                    DataValueField="GroupTypeID" SelectedValue='<%# Bind("GroupTypeID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList12" runat="server" 

                    AppendDataBoundItems="True" DataSourceID="group" DataTextField="GroupType" 

                    DataValueField="GroupTypeID" SelectedValue='<%# Bind("GroupTypeID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label28" runat="server" Text='<%# Eval("GroupType") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="SAP Vendor#" SortExpression="SAPVendor">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox42" runat="server" EmptyMessage="Enter SAP vendor number here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("SAPVendor") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator34" runat="server" ControlToValidate="RadTextBox42"

                    ErrorMessage="SAP Vendor" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox41" runat="server" EmptyMessage="Enter SAP vendor number here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("SAPVendor") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator35" runat="server" ControlToValidate="RadTextBox41"

                    ErrorMessage="SAP Vendor" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label29" runat="server" Text='<%# Eval("SAPVendor") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="CARMS#" SortExpression="CARMSID">

            <EditItemTemplate>

                <telerik:RadTextBox ID="RadTextBox44" runat="server" EmptyMessage="Enter CARMS number here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("CARMSID") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator36" runat="server" ControlToValidate="RadTextBox44"

                    ErrorMessage="CARMS Number" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadTextBox ID="RadTextBox43" runat="server" EmptyMessage="Enter CARMS number here"

                    LabelCssClass="radLabelCss_Vista" Skin="Vista" Text='<%# Bind("CARMSID") %>'

                    Width="200px">

                </telerik:RadTextBox>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator37" runat="server" ControlToValidate="RadTextBox43"

                    ErrorMessage="CARMS Number" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label30" runat="server" Text='<%# Eval("CARMSID") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="CMA Name" SortExpression="CMAID">

            <EditItemTemplate>

                <asp:DropDownList ID="DropDownList13" runat="server" 

                    AppendDataBoundItems="True" DataSourceID="CMA" DataTextField="CMAName" 

                    DataValueField="CMAID" SelectedValue='<%# Bind("CMAID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator39" runat="server" ControlToValidate="DropDownList13"

                    ErrorMessage="CMA" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <asp:DropDownList ID="DropDownList14" runat="server" 

                    AppendDataBoundItems="True" DataSourceID="CMA" DataTextField="CMAName" 

                    DataValueField="CMAID" SelectedValue='<%# Bind("CMAID") %>'>

                    <asp:ListItem Value="-1">-Please Select-</asp:ListItem>

                </asp:DropDownList>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator38" runat="server" ControlToValidate="DropDownList14"

                    ErrorMessage="CMA" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label31" runat="server" Text='<%# Eval("CMAName") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="Date Added" SortExpression="DateAdded">

            <EditItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker8" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "DateAdded") %>'>

                    <Calendar ID="Calendar2" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator43" runat="server" ControlToValidate="Raddatepicker8"

                    ErrorMessage="Date Added" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </EditItemTemplate>

            <InsertItemTemplate>

                <telerik:RadDatePicker ID="Raddatepicker9" MinDate="1/1/1990" runat="server" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "DateAdded") %>'>

                    <Calendar ID="Calendar5" Skin="Vista" runat="server">

                    </Calendar>

                </telerik:RadDatePicker>

                <asp:RequiredFieldValidator ID="RequiredFieldValidator41" runat="server" ControlToValidate="Raddatepicker9"

                    ErrorMessage="Date Added" SetFocusOnError="True" ValidationGroup="CustDetails">*</asp:RequiredFieldValidator>

            </InsertItemTemplate>

            <ItemTemplate>

                <asp:Label ID="Label32" runat="server" Text='<%# Eval("DateAdded") %>'></asp:Label>

            </ItemTemplate>

        </asp:TemplateField>

        <asp:TemplateField HeaderText="CustomerDetails_EditedBy" SortExpression="CustomerDetails_EditedBy">

        </asp:TemplateField>

        <asp:TemplateField HeaderText="CustomerDetails_EditedDate" SortExpression="CustomerDetails_EditedDate">

        </asp:TemplateField>

    </Fields>

</asp:DetailsView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"

    ConnectionString="<%$ ConnectionStrings:CMA_projects %>" DeleteCommand="DELETE FROM customers_data_0_details WHERE (CustomerID = @original_CustomerID) AND (Name_Contact = @original_Name_Contact OR Name_Contact IS NULL AND @original_Name_Contact IS NULL) AND (CMAID = @original_CMAID OR CMAID IS NULL AND @original_CMAID IS NULL) AND (DateAdded = @original_DateAdded OR DateAdded IS NULL AND @original_DateAdded IS NULL) AND (Name_First = @original_Name_First OR Name_First IS NULL AND @original_Name_First IS NULL) AND (Name_Last = @original_Name_Last OR Name_Last IS NULL AND @original_Name_Last IS NULL) AND (Name_Entity = @original_Name_Entity OR Name_Entity IS NULL AND @original_Name_Entity IS NULL) AND (CARMSID = @original_CARMSID OR CARMSID IS NULL AND @original_CARMSID IS NULL) AND (PreferredContactMethod = @original_PreferredContactMethod OR PreferredContactMethod IS NULL AND @original_PreferredContactMethod IS NULL) AND (Phone_Business = @original_Phone_Business OR Phone_Business IS NULL AND @original_Phone_Business IS NULL) AND (Mobile_Business = @original_Mobile_Business OR Mobile_Business IS NULL AND @original_Mobile_Business IS NULL) AND (Fax_Business = @original_Fax_Business OR Fax_Business IS NULL AND @original_Fax_Business IS NULL) AND (Email_Business = @original_Email_Business OR Email_Business IS NULL AND @original_Email_Business IS NULL) AND (Phone_Private = @original_Phone_Private OR Phone_Private IS NULL AND @original_Phone_Private IS NULL) AND (ABN = @original_ABN OR ABN IS NULL AND @original_ABN IS NULL) AND (ACN = @original_ACN OR ACN IS NULL AND @original_ACN IS NULL) AND (Name_LegalTrading = @original_Name_LegalTrading OR Name_LegalTrading IS NULL AND @original_Name_LegalTrading IS NULL) AND (TradingNameCount = @original_TradingNameCount OR TradingNameCount IS NULL AND @original_TradingNameCount IS NULL) AND (EntityTypeID = @original_EntityTypeID OR EntityTypeID IS NULL AND @original_EntityTypeID IS NULL) AND (GST_Reg = @original_GST_Reg OR GST_Reg IS NULL AND @original_GST_Reg IS NULL) AND (ABNStatusDate = @original_ABNStatusDate OR ABNStatusDate IS NULL AND @original_ABNStatusDate IS NULL) AND (GSTStatusDate = @original_GSTStatusDate OR GSTStatusDate IS NULL AND @original_GSTStatusDate IS NULL) AND (LastModifiedDate = @original_LastModifiedDate OR LastModifiedDate IS NULL AND @original_LastModifiedDate IS NULL) AND (SAPVendor = @original_SAPVendor OR SAPVendor IS NULL AND @original_SAPVendor IS NULL) AND (TitleID = @original_TitleID OR TitleID IS NULL AND @original_TitleID IS NULL) AND (Mailing_Name = @original_Mailing_Name OR Mailing_Name IS NULL AND @original_Mailing_Name IS NULL) AND (Postal_Address = @original_Postal_Address OR Postal_Address IS NULL AND @original_Postal_Address IS NULL) AND (Postal_Address_Line2 = @original_Postal_Address_Line2 OR Postal_Address_Line2 IS NULL AND @original_Postal_Address_Line2 IS NULL) AND (StateID = @original_StateID OR StateID IS NULL AND @original_StateID IS NULL) AND (LocationID = @original_LocationID OR LocationID IS NULL AND @original_LocationID IS NULL) AND (PostCodeID = @original_PostCodeID OR PostCodeID IS NULL AND @original_PostCodeID IS NULL) AND (POBox = @original_POBox OR POBox IS NULL AND @original_POBox IS NULL) AND (GroupIS = @original_GroupIS OR GroupIS IS NULL AND @original_GroupIS IS NULL) AND (GroupTypeID = @original_GroupTypeID OR GroupTypeID IS NULL AND @original_GroupTypeID IS NULL) AND (Latitude = @original_Latitude OR Latitude IS NULL AND @original_Latitude IS NULL) AND (Longtitude = @original_Longtitude OR Longtitude IS NULL AND @original_Longtitude IS NULL) AND (UserId = @original_UserId OR UserId IS NULL AND @original_UserId IS NULL) AND (CustomerDetails_EditedBy = @original_CustomerDetails_EditedBy OR CustomerDetails_EditedBy IS NULL AND @original_CustomerDetails_EditedBy IS NULL) AND (CustomerDetails_EditedDate = @original_CustomerDetails_EditedDate OR CustomerDetails_EditedDate IS NULL AND @original_CustomerDetails_EditedDate IS NULL) AND (ApplicantIDLink = @original_ApplicantIDLink OR ApplicantIDLink IS NULL AND @original_ApplicantIDLink IS NULL) AND (SSMA_TimeStamp = @original_SSMA_TimeStamp)"

    InsertCommand="INSERT INTO customers_data_0_details(Name_Contact, CMAID, DateAdded, Name_First, Name_Last, Name_Entity, CARMSID, PreferredContactMethod, Phone_Business, Mobile_Business, Fax_Business, Email_Business, Phone_Private, ABN, ACN, Name_LegalTrading, TradingNameCount, EntityTypeID, GST_Reg, ABNStatusDate, GSTStatusDate, LastModifiedDate, SAPVendor, TitleID, Mailing_Name, Postal_Address, Postal_Address_Line2, StateID, LocationID, PostCodeID, POBox, GroupIS, GroupTypeID, Latitude, Longtitude, CustomerDetails_EditedBy, CustomerDetails_EditedDate) VALUES (@Name_Contact, @CMAID, @DateAdded, @Name_First, @Name_Last, @Name_Entity, @CARMSID, @PreferredContactMethod, @Phone_Business, @Mobile_Business, @Fax_Business, @Email_Business, @Phone_Private, @ABN, @ACN, @Name_LegalTrading, @TradingNameCount, @EntityTypeID, @GST_Reg, @ABNStatusDate, @GSTStatusDate, @LastModifiedDate, @SAPVendor, @TitleID, @Mailing_Name, @Postal_Address, @Postal_Address_Line2, @StateID, @LocationID, @PostCodeID, @POBox, @GroupIS, @GroupTypeID, @Latitude, @Longtitude, @CustomerDetails_EditedBy, @CustomerDetails_EditedDate)"

    OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT customers_data_0_details.CustomerID, customers_data_0_details.Name_Contact, customers_data_0_details.CMAID, customers_data_0_details.DateAdded, customers_data_0_details.Name_First, customers_data_0_details.Name_Last, customers_data_0_details.Name_Entity, customers_data_0_details.CARMSID, customers_data_0_details.PreferredContactMethod, customers_data_0_details.Phone_Business, customers_data_0_details.Mobile_Business, customers_data_0_details.Fax_Business, customers_data_0_details.Email_Business, customers_data_0_details.Phone_Private, customers_data_0_details.ABN, customers_data_0_details.ACN, customers_data_0_details.Name_LegalTrading, customers_data_0_details.TradingNameCount, customers_data_0_details.EntityTypeID, customers_data_0_details.GST_Reg, customers_data_0_details.ABNStatusDate, customers_data_0_details.GSTStatusDate, customers_data_0_details.LastModifiedDate, customers_data_0_details.SAPVendor, customers_data_0_details.TitleID, customers_data_0_details.Mailing_Name, customers_data_0_details.Postal_Address, customers_data_0_details.Postal_Address_Line2, customers_data_0_details.StateID, customers_data_0_details.LocationID, customers_data_0_details.PostCodeID, customers_data_0_details.POBox, customers_data_0_details.GroupIS, customers_data_0_details.GroupTypeID, customers_data_0_details.Latitude, customers_data_0_details.Longtitude, customers_data_0_details.CustomerDetails_EditedBy, customers_data_0_details.CustomerDetails_EditedDate, customers_lut_location.Locality, shared_lut_cma_nsw_names.CMAName, shared_lut_state_name.State, customers_lut_group_type.GroupType, shared_lut_postcodes_australia.PostCode, customers_lut_entity_type.EntityType, customers_lut_corr_mail_title.Title FROM customers_data_0_details LEFT OUTER JOIN shared_lut_state_name ON customers_data_0_details.StateID = shared_lut_state_name.StateID LEFT OUTER JOIN shared_lut_postcodes_australia ON customers_data_0_details.PostCodeID = shared_lut_postcodes_australia.PID LEFT OUTER JOIN shared_lut_cma_nsw_names ON customers_data_0_details.CMAID = shared_lut_cma_nsw_names.CMAID LEFT OUTER JOIN customers_lut_location ON customers_data_0_details.LocationID = customers_lut_location.LocationID LEFT OUTER JOIN customers_lut_corr_mail_title ON customers_data_0_details.TitleID = customers_lut_corr_mail_title.TitleID LEFT OUTER JOIN customers_lut_group_type ON customers_data_0_details.GroupTypeID = customers_lut_group_type.GroupTypeID LEFT OUTER JOIN customers_lut_entity_type ON customers_data_0_details.EntityTypeID = customers_lut_entity_type.EntityTypeID WHERE (customers_data_0_details.Name_Contact IS NOT NULL) AND (customers_data_0_details.Name_First IS NOT NULL)"

    UpdateCommand="UPDATE customers_data_0_details SET Name_Contact = @Name_Contact, CMAID = @CMAID, DateAdded = @DateAdded, Name_First = @Name_First, Name_Last = @Name_Last, Name_Entity = @Name_Entity, CARMSID = @CARMSID, PreferredContactMethod = @PreferredContactMethod, Phone_Business = @Phone_Business, Mobile_Business = @Mobile_Business, Fax_Business = @Fax_Business, Email_Business = @Email_Business, Phone_Private = @Phone_Private, ABN = @ABN, ACN = @ACN, Name_LegalTrading = @Name_LegalTrading, TradingNameCount = @TradingNameCount, EntityTypeID = @EntityTypeID, GST_Reg = @GST_Reg, ABNStatusDate = @ABNStatusDate, GSTStatusDate = @GSTStatusDate, LastModifiedDate = @LastModifiedDate, SAPVendor = @SAPVendor, TitleID = @TitleID, Mailing_Name = @Mailing_Name, Postal_Address = @Postal_Address, Postal_Address_Line2 = @Postal_Address_Line2, StateID = @StateID, LocationID = @LocationID, PostCodeID = @PostCodeID, POBox = @POBox, GroupIS = @GroupIS, GroupTypeID = @GroupTypeID, Latitude = @Latitude, Longtitude = @Longtitude, CustomerDetails_EditedBy = @CustomerDetails_EditedBy, CustomerDetails_EditedDate = @CustomerDetails_EditedDate WHERE (CustomerID = @original_CustomerID) AND (Name_Contact = @original_Name_Contact OR Name_Contact IS NULL AND @original_Name_Contact IS NULL) AND (CMAID = @original_CMAID OR CMAID IS NULL AND @original_CMAID IS NULL) AND (DateAdded = @original_DateAdded OR DateAdded IS NULL AND @original_DateAdded IS NULL) AND (Name_First = @original_Name_First OR Name_First IS NULL AND @original_Name_First IS NULL) AND (Name_Last = @original_Name_Last OR Name_Last IS NULL AND @original_Name_Last IS NULL) AND (Name_Entity = @original_Name_Entity OR Name_Entity IS NULL AND @original_Name_Entity IS NULL) AND (CARMSID = @original_CARMSID OR CARMSID IS NULL AND @original_CARMSID IS NULL) AND (PreferredContactMethod = @original_PreferredContactMethod OR PreferredContactMethod IS NULL AND @original_PreferredContactMethod IS NULL) AND (Phone_Business = @original_Phone_Business OR Phone_Business IS NULL AND @original_Phone_Business IS NULL) AND (Mobile_Business = @original_Mobile_Business OR Mobile_Business IS NULL AND @original_Mobile_Business IS NULL) AND (Fax_Business = @original_Fax_Business OR Fax_Business IS NULL AND @original_Fax_Business IS NULL) AND (Email_Business = @original_Email_Business OR Email_Business IS NULL AND @original_Email_Business IS NULL) AND (Phone_Private = @original_Phone_Private OR Phone_Private IS NULL AND @original_Phone_Private IS NULL) AND (ABN = @original_ABN OR ABN IS NULL AND @original_ABN IS NULL) AND (ACN = @original_ACN OR ACN IS NULL AND @original_ACN IS NULL) AND (Name_LegalTrading = @original_Name_LegalTrading OR Name_LegalTrading IS NULL AND @original_Name_LegalTrading IS NULL) AND (TradingNameCount = @original_TradingNameCount OR TradingNameCount IS NULL AND @original_TradingNameCount IS NULL) AND (EntityTypeID = @original_EntityTypeID OR EntityTypeID IS NULL AND @original_EntityTypeID IS NULL) AND (GST_Reg = @original_GST_Reg OR GST_Reg IS NULL AND @original_GST_Reg IS NULL) AND (ABNStatusDate = @original_ABNStatusDate OR ABNStatusDate IS NULL AND @original_ABNStatusDate IS NULL) AND (GSTStatusDate = @original_GSTStatusDate OR GSTStatusDate IS NULL AND @original_GSTStatusDate IS NULL) AND (LastModifiedDate = @original_LastModifiedDate OR LastModifiedDate IS NULL AND @original_LastModifiedDate IS NULL) AND (SAPVendor = @original_SAPVendor OR SAPVendor IS NULL AND @original_SAPVendor IS NULL) AND (TitleID = @original_TitleID OR TitleID IS NULL AND @original_TitleID IS NULL) AND (Mailing_Name = @original_Mailing_Name OR Mailing_Name IS NULL AND @original_Mailing_Name IS NULL) AND (Postal_Address = @original_Postal_Address OR Postal_Address IS NULL AND @original_Postal_Address IS NULL) AND (Postal_Address_Line2 = @original_Postal_Address_Line2 OR Postal_Address_Line2 IS NULL AND @original_Postal_Address_Line2 IS NULL) AND (StateID = @original_StateID OR StateID IS NULL AND @original_StateID IS NULL) AND (LocationID = @original_LocationID OR LocationID IS NULL AND @original_LocationID IS NULL) AND (PostCodeID = @original_PostCodeID OR PostCodeID IS NULL AND @original_PostCodeID IS NULL) AND (POBox = @original_POBox OR POBox IS NULL AND @original_POBox IS NULL) AND (GroupIS = @original_GroupIS OR GroupIS IS NULL AND @original_GroupIS IS NULL) AND (GroupTypeID = @original_GroupTypeID OR GroupTypeID IS NULL AND @original_GroupTypeID IS NULL) AND (Latitude = @original_Latitude OR Latitude IS NULL AND @original_Latitude IS NULL) AND (Longtitude = @original_Longtitude OR Longtitude IS NULL AND @original_Longtitude IS NULL) AND (CustomerDetails_EditedBy = @original_CustomerDetails_EditedBy OR CustomerDetails_EditedBy IS NULL AND @original_CustomerDetails_EditedBy IS NULL) AND (CustomerDetails_EditedDate = @original_CustomerDetails_EditedDate OR CustomerDetails_EditedDate IS NULL AND @original_CustomerDetails_EditedDate IS NULL)">

    <DeleteParameters>
 
 

        <asp:Parameter Name="original_CustomerID" Type="Int32" />

        <asp:Parameter Name="original_Name_Contact" Type="String" />

        <asp:Parameter Name="original_CMAID" Type="Int32" />

        <asp:Parameter Name="original_DateAdded" Type="DateTime" />

        <asp:Parameter Name="original_Name_First" Type="String" />

        <asp:Parameter Name="original_Name_Last" Type="String" />

        <asp:Parameter Name="original_Name_Entity" Type="String" />

        <asp:Parameter Name="original_CARMSID" Type="String" />

        <asp:Parameter Name="original_PreferredContactMethod" Type="Int32" />

        <asp:Parameter Name="original_Phone_Business" Type="String" />

        <asp:Parameter Name="original_Mobile_Business" Type="String" />

        <asp:Parameter Name="original_Fax_Business" Type="String" />

        <asp:Parameter Name="original_Email_Business" Type="String" />

        <asp:Parameter Name="original_Phone_Private" Type="String" />

        <asp:Parameter Name="original_ABN" Type="String" />

        <asp:Parameter Name="original_ACN" Type="String" />

        <asp:Parameter Name="original_Name_LegalTrading" Type="String" />

        <asp:Parameter Name="original_TradingNameCount" Type="Int32" />

        <asp:Parameter Name="original_EntityTypeID" Type="Int32" />

        <asp:Parameter Name="original_GST_Reg" Type="Int32" />

        <asp:Parameter Name="original_ABNStatusDate" Type="DateTime" />

        <asp:Parameter Name="original_GSTStatusDate" Type="DateTime" />

        <asp:Parameter Name="original_LastModifiedDate" Type="DateTime" />

        <asp:Parameter Name="original_SAPVendor" Type="String" />

        <asp:Parameter Name="original_TitleID" Type="Int32" />

        <asp:Parameter Name="original_Mailing_Name" Type="String" />

        <asp:Parameter Name="original_Postal_Address" Type="String" />

        <asp:Parameter Name="original_Postal_Address_Line2" Type="String" />

        <asp:Parameter Name="original_StateID" Type="Int32" />

        <asp:Parameter Name="original_LocationID" Type="Int32" />

        <asp:Parameter Name="original_PostCodeID" Type="Int32" />

        <asp:Parameter Name="original_POBox" Type="String" />

        <asp:Parameter Name="original_GroupIS" Type="Boolean" />

        <asp:Parameter Name="original_GroupTypeID" Type="Int32" />

        <asp:Parameter Name="original_Latitude" Type="Int32" />

        <asp:Parameter Name="original_Longtitude" Type="Int32" />

        <asp:Parameter Name="original_UserId" Type="Object" />

        <asp:Parameter Name="original_CustomerDetails_EditedBy" Type="String" />

        <asp:Parameter Name="original_CustomerDetails_EditedDate" Type="DateTime" />

        <asp:Parameter Name="original_ApplicantIDLink" Type="Int32" />

        <asp:Parameter Name="original_SSMA_TimeStamp" Type="Object" />

    </DeleteParameters>

    <UpdateParameters>

        <asp:Parameter Name="Name_Contact" Type="String" />

        <asp:Parameter Name="CMAID" Type="Int32" />

        <asp:Parameter Name="DateAdded" Type="DateTime" />

        <asp:Parameter Name="Name_First" Type="String" />

        <asp:Parameter Name="Name_Last" Type="String" />

        <asp:Parameter Name="Name_Entity" Type="String" />

        <asp:Parameter Name="CARMSID" Type="String" />

        <asp:Parameter Name="PreferredContactMethod" Type="Int32" />

        <asp:Parameter Name="Phone_Business" Type="String" />

        <asp:Parameter Name="Mobile_Business" Type="String" />

        <asp:Parameter Name="Fax_Business" Type="String" />

        <asp:Parameter Name="Email_Business" Type="String" />

        <asp:Parameter Name="Phone_Private" Type="String" />

        <asp:Parameter Name="ABN" Type="String" />

        <asp:Parameter Name="ACN" Type="String" />

        <asp:Parameter Name="Name_LegalTrading" Type="String" />

        <asp:Parameter Name="TradingNameCount" Type="Int32" />

        <asp:Parameter Name="EntityTypeID" Type="Int32" />

        <asp:Parameter Name="GST_Reg" Type="Int32" />

        <asp:Parameter Name="ABNStatusDate" Type="DateTime" />

        <asp:Parameter Name="GSTStatusDate" Type="DateTime" />

        <asp:Parameter Name="LastModifiedDate" Type="DateTime" />

        <asp:Parameter Name="SAPVendor" Type="String" />

        <asp:Parameter Name="TitleID" Type="Int32" />

        <asp:Parameter Name="Mailing_Name" Type="String" />

        <asp:Parameter Name="Postal_Address" Type="String" />

        <asp:Parameter Name="Postal_Address_Line2" Type="String" />

        <asp:Parameter Name="StateID" Type="Int32" />

        <asp:Parameter Name="LocationID" Type="Int32" />

        <asp:Parameter Name="PostCodeID" Type="Int32" />

        <asp:Parameter Name="POBox" Type="String" />

        <asp:Parameter Name="GroupIS" Type="Boolean" />

        <asp:Parameter Name="GroupTypeID" Type="Int32" />

        <asp:Parameter Name="Latitude" Type="Int32" />

        <asp:Parameter Name="Longtitude" Type="Int32" />

        <asp:Parameter Name="CustomerDetails_EditedBy" Type="String" />

        <asp:Parameter Name="CustomerDetails_EditedDate" Type="DateTime" />

        <asp:Parameter Name="original_CustomerID" Type="Int32" />

        <asp:Parameter Name="original_Name_Contact" Type="String" />

        <asp:Parameter Name="original_CMAID" Type="Int32" />

        <asp:Parameter Name="original_DateAdded" Type="DateTime" />

        <asp:Parameter Name="original_Name_First" Type="String" />

        <asp:Parameter Name="original_Name_Last" Type="String" />

        <asp:Parameter Name="original_Name_Entity" Type="String" />

        <asp:Parameter Name="original_CARMSID" Type="String" />

        <asp:Parameter Name="original_PreferredContactMethod" Type="Int32" />

        <asp:Parameter Name="original_Phone_Business" Type="String" />

        <asp:Parameter Name="original_Mobile_Business" Type="String" />

        <asp:Parameter Name="original_Fax_Business" Type="String" />

        <asp:Parameter Name="original_Email_Business" Type="String" />

        <asp:Parameter Name="original_Phone_Private" Type="String" />

        <asp:Parameter Name="original_ABN" Type="String" />

        <asp:Parameter Name="original_ACN" Type="String" />

        <asp:Parameter Name="original_Name_LegalTrading" Type="String" />

        <asp:Parameter Name="original_TradingNameCount" Type="Int32" />

        <asp:Parameter Name="original_EntityTypeID" Type="Int32" />

        <asp:Parameter Name="original_GST_Reg" Type="Int32" />

        <asp:Parameter Name="original_ABNStatusDate" Type="DateTime" />

        <asp:Parameter Name="original_GSTStatusDate" Type="DateTime" />

        <asp:Parameter Name="original_LastModifiedDate" Type="DateTime" />

        <asp:Parameter Name="original_SAPVendor" Type="String" />

        <asp:Parameter Name="original_TitleID" Type="Int32" />

        <asp:Parameter Name="original_Mailing_Name" Type="String" />

        <asp:Parameter Name="original_Postal_Address" Type="String" />

        <asp:Parameter Name="original_Postal_Address_Line2" Type="String" />

        <asp:Parameter Name="original_StateID" Type="Int32" />

        <asp:Parameter Name="original_LocationID" Type="Int32" />

        <asp:Parameter Name="original_PostCodeID" Type="Int32" />

        <asp:Parameter Name="original_POBox" Type="String" />

        <asp:Parameter Name="original_GroupIS" Type="Boolean" />

        <asp:Parameter Name="original_GroupTypeID" Type="Int32" />

        <asp:Parameter Name="original_Latitude" Type="Int32" />

        <asp:Parameter Name="original_Longtitude" Type="Int32" />

        <asp:Parameter Name="original_CustomerDetails_EditedBy" Type="String" />

        <asp:Parameter Name="original_CustomerDetails_EditedDate" Type="DateTime" />

    </UpdateParameters>

    <InsertParameters>

        <asp:Parameter Name="Name_Contact" Type="String" />

        <asp:Parameter Name="CMAID" Type="Int32" />

        <asp:Parameter Name="DateAdded" Type="DateTime" />

        <asp:Parameter Name="Name_First" Type="String" />

        <asp:Parameter Name="Name_Last" Type="String" />

        <asp:Parameter Name="Name_Entity" Type="String" />

        <asp:Parameter Name="CARMSID" Type="String" />

        <asp:Parameter Name="PreferredContactMethod" Type="Int32" />
 

        <asp:Parameter Name="Phone_Business" Type="String" />

        <asp:Parameter Name="Mobile_Business" Type="String" />

        <asp:Parameter Name="Fax_Business" Type="String" />

        <asp:Parameter Name="Email_Business" Type="String" />

        <asp:Parameter Name="Phone_Private" Type="String" />

        <asp:Parameter Name="ABN" Type="String" />

        <asp:Parameter Name="ACN" Type="String" />

        <asp:Parameter Name="Name_LegalTrading" Type="String" />

        <asp:Parameter Name="TradingNameCount" Type="Int32" />

        <asp:Parameter Name="EntityTypeID" Type="Int32" />

        <asp:Parameter Name="GST_Reg" Type="Int32" />

        <asp:Parameter Name="ABNStatusDate" Type="DateTime" />

        <asp:Parameter Name="GSTStatusDate" Type="DateTime" />

        <asp:Parameter Name="LastModifiedDate" Type="DateTime" />

        <asp:Parameter Name="SAPVendor" Type="String" />

        <asp:Parameter Name="TitleID" Type="Int32" />

        <asp:Parameter Name="Mailing_Name" Type="String" />

        <asp:Parameter Name="Postal_Address" Type="String" />

        <asp:Parameter Name="Postal_Address_Line2" Type="String" />

        <asp:Parameter Name="StateID" Type="Int32" />

        <asp:Parameter Name="LocationID" Type="Int32" />

        <asp:Parameter Name="PostCodeID" Type="Int32" />

        <asp:Parameter Name="POBox" Type="String" />

        <asp:Parameter Name="GroupIS" Type="Boolean" />

        <asp:Parameter Name="GroupTypeID" Type="Int32" />

        <asp:Parameter Name="Latitude" Type="Int32" />

        <asp:Parameter Name="Longtitude" Type="Int32" />

        <asp:Parameter Name="CustomerDetails_EditedBy" Type="String" />

        <asp:Parameter Name="CustomerDetails_EditedDate" Type="DateTime" />

    </InsertParameters>

</asp:SqlDataSource>

<asp:SqlDataSource ID="Town" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [LocationID], [Locality] FROM [customers_lut_location]">

</asp:SqlDataSource>

<asp:SqlDataSource ID="state" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [StateID], [State] FROM [shared_lut_state_name]"></asp:SqlDataSource>

<asp:SqlDataSource ID="Entity" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [EntityTypeID], [EntityType] FROM [customers_lut_entity_type]">

</asp:SqlDataSource>

<asp:SqlDataSource ID="Postcode" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [PostCode], [PID] FROM [shared_lut_postcodes_australia]">

</asp:SqlDataSource>

<asp:SqlDataSource ID="CMA" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [CMAID], [CMAName] FROM [shared_lut_cma_nsw_names] WHERE ([CMAID] = @CMAID)">

    <SelectParameters>

        <asp:SessionParameter Name="CMAID" SessionField="CMAID" Type="Int32" />

    </SelectParameters>

</asp:SqlDataSource>

<asp:SqlDataSource ID="group" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"

    SelectCommand="SELECT [GroupTypeID], [GroupType] FROM [customers_lut_group_type] WHERE ([CMAID] = @CMAID)">

    <SelectParameters>

        <asp:SessionParameter Name="CMAID" SessionField="CMAID" Type="Int32" />

    </SelectParameters>

</asp:SqlDataSource>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="AutoDetect">

</telerik:RadScriptManager>

<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="CustDetails"

    HeaderText="Required Fields" ShowMessageBox="True" />

Open in new window

0
Comment
Question by:Small_Balls
12 Comments
 
LVL 6

Expert Comment

by:RishadanPort
Comment Utility
Does your list have a "SelectedItem" attribute? If so try using this... I have always had problems versus when I should use the SelectedValue versus SelectedItem....   I usually always use SelectedItem
0
 
LVL 26

Expert Comment

by:Anurag Thakur
Comment Utility
what value you are trying to select from the dropdownlist which throws the error that value does not exist
0
 
LVL 16

Accepted Solution

by:
GreymanMSC earned 250 total points
Comment Utility
Change the Value in the default ListItem to a null string, rather than -1.

The error means that the value of the bound field (TitleID) does not match any in the dropdownlist's datasource.   I suspect that you are colliding with a NULL value in the customers_data_0_details table.
<asp:DropDownList ID="DropDownList1" runat="server"

    AppendDataBoundItems="True" 

    DataSourceID="title" DataTextField="Title" DataValueField="TitleID" 

    SelectedValue='<%# Bind("TitleID") %>'>

    <asp:ListItem Value="">-Please Select-</asp:ListItem>

</asp:DropDownList>

                

Open in new window

0
 
LVL 20

Expert Comment

by:informaniac
Comment Utility
In the Row_Created event of the gridview you'll have to bind the dropdownlist to the list of items

SelectedValue='<%# Bind("TitleID") %>'>
 is giving error coz it doesn't have an item to bind with in the dropdown...

0
 

Author Comment

by:Small_Balls
Comment Utility
GreymanMSC,

I had originaly removed theValue="-1" but ran into the same problem...

so this does not help
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Small_Balls
Comment Utility
informainac,

I am using a detailsview not a gridview...
but can you please explain a little on your idea??
0
 

Author Comment

by:Small_Balls
Comment Utility
Just a note for all,

This all works fine when i insert a record it is only when i edit a record that i run into problems..
0
 
LVL 20

Expert Comment

by:informaniac
Comment Utility
Sorry i didn't notice that...

That error might be occuring coz the items that are getting populated in the dropdownlist are different....

For eg if the dropdownlist contains the items 1,2,3,4,5 and if Bind("TitleID") is returning 6 then this error might occur
0
 

Expert Comment

by:dkim18
Comment Utility
I have a similar issue.
Did you get this fixed??
I searched everywhere but can't seem to find a solution yet.
0
 

Author Comment

by:Small_Balls
Comment Utility
Hello informaniac there is no problem when I build my own forms so I know that the data matches, the only reason I am using the details view is beacuse that is what my client requested... I prefer to use telerik controls.. but oh well the customer is always right..  ;
0
 
LVL 37

Assisted Solution

by:samtran0331
samtran0331 earned 250 total points
Comment Utility
GreymanMSC is correct in that there is a colliding value (there are records in customers_data_0_details table where the TitleID is not in the customers_lut_corr_mail_title table)...but it doesn't necessarily have to be a null that is causing the problem (although it usually is a null...especially with all the LEFT OUTER JOIN's)

You can check to see if there are legitimate values that are missing from customers_lut_corr_mail_title with:

SELECT
customers_data_0_details.TitleID,
FROM customers_data_0_details
LEFT OUTER JOIN shared_lut_state_name ON customers_data_0_details.StateID = shared_lut_state_name.StateID
LEFT OUTER JOIN shared_lut_postcodes_australia ON customers_data_0_details.PostCodeID = shared_lut_postcodes_australia.PID
LEFT OUTER JOIN shared_lut_cma_nsw_names ON customers_data_0_details.CMAID = shared_lut_cma_nsw_names.CMAID
LEFT OUTER JOIN customers_lut_location ON customers_data_0_details.LocationID = customers_lut_location.LocationID
LEFT OUTER JOIN customers_lut_corr_mail_title ON customers_data_0_details.TitleID = customers_lut_corr_mail_title.TitleID
LEFT OUTER JOIN customers_lut_group_type ON customers_data_0_details.GroupTypeID = customers_lut_group_type.GroupTypeID
LEFT OUTER JOIN customers_lut_entity_type ON customers_data_0_details.EntityTypeID = customers_lut_entity_type.EntityTypeID
WHERE (customers_data_0_details.Name_Contact IS NOT NULL) AND (customers_data_0_details.Name_First IS NOT NULL)
AND customers_data_0_details.TitleID NOT IN (SELECT DISTINCT TitleID FROM customers_lut_corr_mail_title)


it's basically a stripped down version of your main datasource plus an additional line in the WHERE clause to show titleid's that don't exist in the titles table.....

let me/us know the results of the above...



0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now