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 true;
},
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: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:BoundDataField DataFieldName="AB_NUMBER" Key="AB_NUMBER" Hidden="true">
<Header Text="AB_NUMBER" />
<ig:UnboundField Key="CURRENT_DAY" Width="55px">
<Header TemplateId="currDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW" Width="55px">
<Header TemplateId="secondDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW_PLUS_ONE" Width="55px">
<Header TemplateId="thirdDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW_PLUS_TWO" Width="55px">
<Header TemplateId="fourthDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW_PLUS_THREE" Width="55px">
<Header TemplateId="fifthDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW_PLUS_FOUR" Width="55px">
<Header TemplateId="sixthDayDateHeaderTemplate" />
<ig:UnboundField Key="TOMMORROW_PLUS_FIVE" Width="55px">
<Header TemplateId="seventhDayDateHeaderTemplate"></Header>
<ig:UnboundField Key="PERCENT_ALLOCATED" Header-Text="% Allocated" Width="90px">
<Header Text="% Allocated" />
<ig:TemplateDataField Key="ASSIGNMENTS" Width="90px">
<Header Text="Assignments" />
<asp:LinkButton runat="server" ID="lbtnAssignments" CssClass="LoadingItem" CommandName="SELECT_ASSIGNMENTS"
CommandArgument='<%# Eval("AB_NUMBER") %>'>Assignments</asp:LinkButton>
<ig:TemplateDataField Key="SCHEDULE" Width="90px">
<Header Text="Schedule" />
<asp:LinkButton runat="server" ID="lbtnSchedule" CommandName="SELECT_SCHEDULE" CssClass="LoadingItem" CommandArgument='<%# Eval("AB_NUMBER") %>'>Schedule</asp:LinkButton>
</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">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSecondDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_TOMORROW"><%= currDay.AddDays(1).ToShortDateString() %></asp:LinkButton>
<cc1:ItemTemplate ID="dteTemplate3" runat="server" TemplateID="thirdDayDateHeaderTemplate">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnThirdDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_THIRD_DAY"><%= currDay.AddDays(2).ToShortDateString() %></asp:LinkButton>
<cc1:ItemTemplate ID="dteTemplate4" runat="server" TemplateID="fourthDayDateHeaderTemplate">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnFourthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_FOURTH_DAY"><%= currDay.AddDays(3).ToShortDateString() %></asp:LinkButton>
<cc1:ItemTemplate ID="dteTemplate5" runat="server" TemplateID="fifthDayDateHeaderTemplate">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnFifthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_FIFTH_DAY"><%= currDay.AddDays(4).ToShortDateString() %></asp:LinkButton>
<cc1:ItemTemplate ID="dteTemplate6" runat="server" TemplateID="sixthDayDateHeaderTemplate">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSixthDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_SIXTH_DAY"><%= currDay.AddDays(5).ToShortDateString() %></asp:LinkButton>
<cc1:ItemTemplate ID="dteTemplate7" runat="server" TemplateID="seventhDayDateHeaderTemplate">
<asp:LinkButton runat="server" CssClass="AssignmentButton" ID="lbtnSeventhDay" PostBackUrl="../ApplicationForms/ManagerInterface/WOScheduler.aspx"
CommandName="ASSIGN_SEVENTH_DAY"><%= currDay.AddDays(6).ToShortDateString() %></asp:LinkButton>
</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>
</emcor:WebPanel>
The link buttons all get set from a textbox datepicker value. What am I missing here?
Hello,
Thank you for contacting us.
I have reviewed the provided code snippet and didn't notice something incorrect. Could you please try to isolate the issue in a sample and send it back to me, this will be highly appreciated.
Looking forward to hearing from you.
Hello
I have this problem since years. It occurs when using wdg_RowAdded client event. When i remove this event i can add my rows normally.
Have you some explanation about this
Thanks
Hafid