Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Add Row generates webpage error
posted

On adding an New Event after double clicking in add row field a WebPage error is generated "Error: 'null' is null or not an object." We ugraded Infragistics version from 11.1  to 11.2 thinking this might help but no avail. We updated Java to version 7 but no avail. Heres our code.

 

Source Code
 
**************************
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="maintScheduledEvent.aspx.cs"
    Inherits="FPR.Maintenance.maintScheduledEvent" %>
 
<%@ Register Assembly="Infragistics35.Web.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
<%@ Register Assembly="Infragistics35.Web.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI" TagPrefix="ig" %>
<%@ Register Assembly="Infragistics35.WebUI.Misc.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<!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>Add/Edit A Scheduled Event</title>
    <link rel="stylesheet" type="text/css" href="../Main.css" />
    <style type="text/css">
        .style3
        {
            width: 980px;
        }
        .style4
        {
            width: 980px;
            font-weight: bold;
        }
        .style5
        {
            width: 980px;
            font-weight: bold;
            color: #0066CC;
        }
        .style6
        {
            color: #0066CC;
            font-weight: bold;
        }
        .style7
        {
            font-size: small;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="style3">
            <tr>
                <td align="right" class="style4" valign="top">
                    <img align="top" alt="" class="style2" src="../Assets/Setup.png" /><span lang="en-us"
                        class="style7"><span class="style6"> </span><span class="style5">Setup</span></span>
                </td>
            </tr>
            <tr>
                <td>
                    <igmisc:WebGroupBox ID="WebGroupBox1" runat="server" Height="480px" StyleSetName=""
                        Text="Add/Edit A Scheduled Event" TitleAlignment="Left" Width="980px">
                        <Template>
                            <br />
                            <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                                Height="350px" Width="790px" DataKeyFields="PK_scheduledEventID"
                                DataMember="DefaultView">
                                <EditorProviders>
                                    <ig:DropDownProvider ID="DEvent">
                                        <EditorControl ID="EditorControl1" runat="server" DisplayMode="DropDownList" DataSourceID="SqlDataSource2"
                                            TextField="Event" ValueField="pk_eventType" Width="200px">
                                            <DropDownItemBinding TextField="Event" ValueField="pk_eventType"></DropDownItemBinding>
                                        </EditorControl>
                                    </ig:DropDownProvider>
                                    <ig:DropDownProvider ID="DTime">
                                        <EditorControl ID="EditorControl2" runat="server" DisplayMode="DropDownList" DataSourceID="SqlDataSource3"
                                            TextField="fTime" ValueField="fTime" Width="100px">
                                            <DropDownItemBinding TextField="fTime" ValueField="fTime"></DropDownItemBinding>
                                        </EditorControl>
                                    </ig:DropDownProvider>
                                    <ig:DropDownProvider ID="DLocation">
                                        <EditorControl ID="EditorControl3" runat="server" DisplayMode="DropDownList" DataSourceID="SqlDataSource4"
                                            TextField="locLocationName" ValueField="PK_locationID" Width="250px" DataKeyFields="PK_locationID">
                                            <DropDownItemBinding TextField="locLocationName" ValueField="PK_locationID"></DropDownItemBinding>
                                        </EditorControl>
                                    </ig:DropDownProvider>
                                    <ig:DatePickerProvider ID="DatePickerProvider1" />
                                </EditorProviders>
                                <Columns>
                                    <ig:BoundDataField DataFieldName="PK_scheduledEventID" Key="PK_scheduledEventID"
                                        Hidden="true">
                                        <Header Text="PK_scheduledEventID" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="fk_eventType" Key="fk_eventType">
                                        <Header Text="Event" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="scheduledEventStartDate" Key="scheduledEventStartDate">
                                        <Header Text="Start Date" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="scheduledEventEndDate" Key="scheduledEventEndDate">
                                        <Header Text="End Date" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="scheduledEventStartTime" Key="scheduledEventStartTime">
                                        <Header Text="Start Time" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="scheduledEventEndTime" Key="scheduledEventEndTime">
                                        <Header Text="End Time" />
                                    </ig:BoundDataField>
                                    <ig:BoundDataField DataFieldName="FK_LocationID" Key="FK_LocationID">
                                        <Header Text="Location" />
                                    </ig:BoundDataField>
                                </Columns>
                                <Behaviors>
                                    <ig:Activation>
                                    </ig:Activation>
                                    <ig:EditingCore>
                                        <Behaviors>
                                            <ig:CellEditing Enabled="true">
                                                <ColumnSettings>
                                                    <ig:EditingColumnSetting ColumnKey="fk_eventType" EditorID="DEvent" />
                                                    <ig:EditingColumnSetting ColumnKey="scheduledEventStartDate" EditorID="DatePickerProvider1" />
                                                    <ig:EditingColumnSetting ColumnKey="scheduledEventEndDate" EditorID="DatePickerProvider1" />
                                                    <ig:EditingColumnSetting ColumnKey="scheduledEventStartTime" EditorID="DTime" />
                                                    <ig:EditingColumnSetting ColumnKey="scheduledEventEndTime" EditorID="DTime" />
                                                    <ig:EditingColumnSetting ColumnKey="FK_LocationID" EditorID="DLocation" />
                                                </ColumnSettings>
                                            </ig:CellEditing>
                                            <ig:RowAdding>
                                                <ColumnSettings>
                                                    <ig:RowAddingColumnSetting ColumnKey="fk_eventType" EditorID="DEvent" />
                                                    <ig:RowAddingColumnSetting ColumnKey="scheduledEventStartDate" EditorID="DatePickerProvider1" />
                                                    <ig:RowAddingColumnSetting ColumnKey="scheduledEventEndDate" EditorID="DatePickerProvider1" />
                                                    <ig:RowAddingColumnSetting ColumnKey="scheduledEventStartTime" EditorID="DTime" />
                                                    <ig:RowAddingColumnSetting ColumnKey="scheduledEventEndTime" EditorID="DTime" />
                                                    <ig:RowAddingColumnSetting ColumnKey="FK_LocationID" EditorID="DLocation" />
                                                </ColumnSettings>
                                            </ig:RowAdding>
                                        </Behaviors>
                                    </ig:EditingCore>
                                    <ig:RowSelectors>
                                    </ig:RowSelectors>
                                </Behaviors>
                            </ig:WebDataGrid>
                            <br />
                            <asp:Button ID="Button1" runat="server" Height="28px" onclick="Button1_Click"
                                Text="Submit" />
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:fcrrConn %>"
                                DeleteCommand="DELETE FROM [tblScheduledEvents] WHERE [PK_scheduledEventID] = @PK_scheduledEventID"
                                InsertCommand="INSERT INTO [tblScheduledEvents] ([fk_eventType], [scheduledEventStartDate], [scheduledEventEndDate], [scheduledEventStartTime], [scheduledEventEndTime], [FK_LocationID]) VALUES (@fk_eventType, @scheduledEventStartDate, @scheduledEventEndDate, @scheduledEventStartTime, @scheduledEventEndTime, @FK_LocationID)"
                                SelectCommand="SELECT PK_scheduledEventID, scheduledEventStartDate, scheduledEventEndDate, scheduledEventStartTime, scheduledEventEndTime, fk_eventType, FK_LocationID FROM tblScheduledEvents ORDER BY scheduledEventStartDate"
                                UpdateCommand="UPDATE [tblScheduledEvents] SET [fk_eventType] = @fk_eventType, [scheduledEventStartDate] = @scheduledEventStartDate, [scheduledEventEndDate] = @scheduledEventEndDate, [scheduledEventStartTime] = @scheduledEventStartTime, [scheduledEventEndTime] = @scheduledEventEndTime, [FK_LocationID] = @FK_LocationID WHERE [PK_scheduledEventID] = @PK_scheduledEventID">
                                <DeleteParameters>
                                    <asp:Parameter Name="PK_scheduledEventID" Type="Int32" />
                                </DeleteParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="fk_eventType" Type="Int32" />
                                    <asp:Parameter DbType="DateTime" Name="scheduledEventStartDate" />
                                    <asp:Parameter DbType="DateTime" Name="scheduledEventEndDate" />
                                    <asp:Parameter Name="scheduledEventStartTime" Type="String" />
                                    <asp:Parameter Name="scheduledEventEndTime" Type="String" />
                                    <asp:Parameter Name="FK_LocationID" Type="Int32" />
                                    <asp:Parameter Name="PK_scheduledEventID" Type="Int32" />
                                </UpdateParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="fk_eventType" Type="Int32" />
                                    <asp:Parameter DbType="DateTime" Name="scheduledEventStartDate" />
                                    <asp:Parameter DbType="DateTime" Name="scheduledEventEndDate" />
                                    <asp:Parameter Name="scheduledEventStartTime" Type="String" />
                                    <asp:Parameter Name="scheduledEventEndTime" Type="String" />
                                    <asp:Parameter Name="FK_LocationID" Type="Int32" />
                                </InsertParameters>
                            </asp:SqlDataSource>
                            <ig:WebScriptManager ID="WebScriptManager1" runat="server">
                            </ig:WebScriptManager>
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:fcrrConn %>"
                               
                                SelectCommand="SELECT pk_eventType, Event FROM tbl_LU_ScheduledEventType ORDER BY Event"></asp:SqlDataSource>
                            <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:fcrrConn %>"
                                SelectCommand="SELECT [fTime] FROM [tbl_LU_TimeScheduler]"></asp:SqlDataSource>
                            <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:fcrrConn %>"
                                SelectCommand="SELECT [PK_locationID], [locLocationName] FROM [tbl_LU_Locations] ORDER BY [locLocationName]">
                            </asp:SqlDataSource>
                        </Template>
                    </igmisc:WebGroupBox>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
 
*****************************

 

 

Parents
No Data
Reply
  • 33839
    Verified Answer
    posted

    Hi,

    Was this a problem with the WebDropDown and add row?  That was a bug that was found in the 11.2 RTM.  It would have been in a Service Release in 11.1 as well.  Its number was 98843.  It has subsequently been fixed.  Its fix will be available in the next SR.

    regards,

    David Young 

Children
No Data