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
20
isDataKeyEqual Dynamic Javascript Runtime Exception
posted

Hello currently I am getting the following error:

Microsoft JScript runtime error: Unable to get value of the property 'valueOf': object is null or undefined

This is happening in the following dynamic javascript function:

isDataKeyEqual: function (dataKey)

            {

                        ///<summary locid="M:J#Infragistics.Web.UI.GridRow.isDataKeyEqual">

                        ///Compares provided data key with the row's data key and returns a

                        ///boolean value indicating whether these are equal.

                        ///</summary>

                        ///<param name="dataKey" type="Array">

                        ///A data key to compare with the row's one.

                        ///</param>

                        ///<returns type="Boolean">

                        ///Boolean value indicating whether the passed in data key is equal to the row's one.

                        ///</returns>

 

                        var rowDataKey = this.get_dataKey();

                        if (rowDataKey && dataKey && rowDataKey.length == dataKey.length)

                        {

                                    for (var i = 0; i < dataKey.length; i++)

                                    {

                                                /* DAY 8/23/11 84816- Row cannot be found on client with compound key that contains Date */

                                                if (rowDataKey[i].valueOf && dataKey[i].valueOf && rowDataKey[i].valueOf() != dataKey[i].valueOf())

                                                            return false;

                                                else if ((!rowDataKey[i].valueOf || !dataKey[i].valueOf) && rowDataKey[i] != dataKey[i])

                                                            return false;

                                    }

                                    return true;

                        }

                        return false;

            },

 

Here's how I have my grid configured:

<ig:WebDataGrid ID="wdgSPSearch" runat="server" AutoGenerateColumns="False" Width="100%" EnableDataViewState="True" EnableViewState="True"

                        

                            OnDataBound="wdgSPSearch_DataBound" OnInitializeRow="wdgSPSearch_InitializeRow"

                            OnItemCommand="wdgSPSearch_ItemCommand">

                            <Columns>

                                <ig:TemplateDataField Key="SELECT" Width="40px">

                                    <ItemTemplate>

                                        <input type="checkbox" id="SelectCheckBox" class="ServiceProviderSelection" runat="server"/>

                                    </ItemTemplate>

                                </ig:TemplateDataField>

                                <ig:UnboundField Key="SUPERVISOR" Header-Text="Supervisor" Width="100px">

                                    <Header Text="Supervisor" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="CRAFT_GROUPS" Header-Text="Craft Group(s)" Width="130px">

                                    <Header Text="Craft Group(s)" />

                                </ig:UnboundField>

                                <ig:BoundDataField DataFieldName="STATUS_NAME" Key="STATUS_NAME" Width="60px">

                                    <Header Text="Status" />

                                </ig:BoundDataField>

                                <ig:UnboundField Key="SP_NUM_NAME" Width="200px" HtmlEncode="false">

                                    <Header Text="Service Provider" />

                                </ig:UnboundField>

                                <ig:BoundDataField DataFieldName="AB_NUMBER" Key="AB_NUMBER" Hidden="true">

                                    <Header Text="AB_NUMBER" />

                                </ig:BoundDataField>

                                <ig:UnboundField Key="CURRENT_DAY" Width="55px">

                                    <Header TemplateId="currDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW" Width="55px">

                                    <Header TemplateId="secondDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW_PLUS_ONE" Width="55px">

                                    <Header TemplateId="thirdDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW_PLUS_TWO" Width="55px">

                                    <Header TemplateId="fourthDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW_PLUS_THREE" Width="55px">

                                    <Header TemplateId="fifthDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW_PLUS_FOUR" Width="55px">

                                    <Header TemplateId="sixthDayDateHeaderTemplate" />

                                </ig:UnboundField>

                                <ig:UnboundField Key="TOMMORROW_PLUS_FIVE" Width="55px">

                                    <Header TemplateId="seventhDayDateHeaderTemplate"></Header>

                                </ig:UnboundField>

                                <ig:UnboundField Key="PERCENT_ALLOCATED" Header-Text="% Allocated" Width="90px">

                                    <Header Text="% Allocated" />

                                </ig:UnboundField>

                                <ig:TemplateDataField Key="ASSIGNMENTS" Width="90px">

                                    <Header Text="Assignments" />

                                    <ItemTemplate>

                                        <asp:LinkButton runat="server" ID="lbtnAssignments" CssClass="LoadingItem" CommandName="SELECT_ASSIGNMENTS"

                                            CommandArgument='<%# Eval("AB_NUMBER") %>'>Assignments</asp:LinkButton>

                                    </ItemTemplate>

                                </ig:TemplateDataField>

                                <ig:TemplateDataField Key="SCHEDULE" Width="90px">

                                    <Header Text="Schedule" />

                                    <ItemTemplate>

                                        <asp:LinkButton runat="server" ID="lbtnSchedule" CommandName="SELECT_SCHEDULE" CssClass="LoadingItem" CommandArgument='<%# Eval("AB_NUMBER") %>'>Schedule</asp:LinkButton>

                                    </ItemTemplate>

                                </ig:TemplateDataField>

                            </Columns>

                            <Templates>

                                <cc1:ItemTemplate ID="dteTemplate" runat="server" TemplateID="currDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnCurrentDay" CommandName="ASSIGN_CURRENT"><%= currDay.ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate2" runat="server" TemplateID="secondDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSecondDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_TOMORROW"><%= currDay.AddDays(1).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate3" runat="server" TemplateID="thirdDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnThirdDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_THIRD_DAY"><%= currDay.AddDays(2).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate4" runat="server" TemplateID="fourthDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnFourthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_FOURTH_DAY"><%= currDay.AddDays(3).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate5" runat="server" TemplateID="fifthDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnFifthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_FIFTH_DAY"><%= currDay.AddDays(4).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate6" runat="server" TemplateID="sixthDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSixthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_SIXTH_DAY"><%= currDay.AddDays(5).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                                <cc1:ItemTemplate ID="dteTemplate7" runat="server" TemplateID="seventhDayDateHeaderTemplate">

                                    <Template>

                                        <asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSeventhDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"

                                            CommandName="ASSIGN_SEVENTH_DAY"><%= currDay.AddDays(6).ToShortDateString() %></asp:LinkButton>

                                    </Template>

                                </cc1:ItemTemplate>

                            </Templates>

                            <Behaviors>

                                <ig:Selection CellClickAction="Row"></ig:Selection>

                            </Behaviors>

                            <EmptyRowsTemplate>

                                <div style="text-align: center;">

                                    No records returned.

                                </div>

                            </EmptyRowsTemplate>

                        </ig:WebDataGrid>

                    </ContentTemplate>

                </asp:UpdatePanel>

            </div>

        </ContentTemplate>

    </emcor:WebPanel>

The link buttons all get set from a textbox datepicker value. What am I missing here?