views:

245

answers:

2

I'm using DevExpress ASPxGridView edit form, using default edit form. However when I open the edit form in IE6 and click "update" to insert the record, it causes a JavaScript error that says "type" is null or not an object". However it works fine in IE7. I am puzzled and unsure of how to resolve this. Code is below.

<dx:ASPxGridView ID="ASPxGridView_JobTitles" runat="server" 
    AutoGenerateColumns="False" Caption="Titles" 
    ClientInstanceName="ASPxClientGridView_Titles" 
    DataSourceID="SqlDataSource_JobTitle" KeyFieldName="Title" Width="500px">
    <Settings UseFixedTableLayout="True" />
    <Columns>
        <dx:GridViewCommandColumn ButtonType="Image" Caption=" " VisibleIndex="0" 
            Width="65px">
            <UpdateButton Visible="True">
                <Image Url="~/images/update.png">
                </Image>
            </UpdateButton>
            <CancelButton Visible="True">
                <Image Url="~/images/cancel.png">
                </Image>
            </CancelButton>
            <EditButton>
                <Image Url="~/images/file_edit.png">
                </Image>
            </EditButton>
            <HeaderTemplate>
                <dx:ASPxButton ID="ASPxButton_New0" runat="server" AutoPostBack="false" 
                    Image-Url="~/images/file_add.png" Text="New">
                    <ClientSideEvents Click="function(s,e){ASPxClientGridView_Titles.AddNewRow();}" />
                </dx:ASPxButton>
            </HeaderTemplate>
        </dx:GridViewCommandColumn>
        <dx:GridViewDataTextColumn FieldName="Title" VisibleIndex="1">
            <PropertiesTextEdit>
                <ValidationSettings CausesValidation="True">
                    <RequiredField ErrorText="Is Required" IsRequired="True" />
                </ValidationSettings>
            </PropertiesTextEdit>
        </dx:GridViewDataTextColumn>
        <dx:GridViewCommandColumn ButtonType="Image" Caption=" " VisibleIndex="2" 
            Width="65px">
            <DeleteButton Visible="True">
                <Image Url="~/images/file_delete.png">
                </Image>
            </DeleteButton>
        </dx:GridViewCommandColumn>
    </Columns>
    <SettingsBehavior ConfirmDelete="True" />
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource_Title" runat="server" 
    ConnectionString="<%$ ConnectionStrings:TEST %>" 
    SelectCommand="SELECT [Title] FROM [Titles]" 
    UpdateCommand="UPDATE Titles SET Title = @Title WHERE (Title = Title)" 
    DeleteCommand="DELETE FROM Titles WHERE (Title = @Title)" 
    InsertCommand="INSERT INTO Titles(Title) VALUES (@Title)">
    <InsertParameters>
        <asp:Parameter Name="Title" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="Title" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
A: 

Hi,

The code you are using is quite correct and I do not see a reason for this error to appear. Please tell which ASPxGridView version are you using? Is it possible for you to use the latest one (10.1.5) ?

DevExpress Team
A: 

I have 10.1.5 and still get javascript error. The error I get is: "Error: 'type' is null or not an object."

Jasmina
@Jasmina,I recommend contacting the support team here with your sample and they can help you:http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question
Mehul