Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Cannot serialize non finite number

Cannot serialize non finite number

New Discussion
Darren
Darren asked on Feb 7, 2013 11:52 AM

Hi there,

I’m using a webdatagrid and have batchUpdating enabled. I add all my rows client-side with this

function AddMarks() {
var grid = $find(“<%=wdgMarks.ClientID %>”);
//var row = new Array(grid.get_rows().length, “ExamMarkId”, “ExaminationId”, “Mark”, “Enhanced”, “DateModified”, “ModifiedBy”); // create a new empty row

var mark = $get(“<%=ddlMarkFrom.ClientID%>”).value + $get(“<%=ddlMarkFrom2.ClientID %>”).value;
var row = new Array(grid.get_rows().length+1, $get(‘<%=hfExamID.ClientID %>’).value, mark, $get(“<%=chkEnhanced.ClientID %>”).checked , “<%=DateTime.Now.ToShortDateString() %>”, “<%=Page.User.Identity.Name%>”); // create a new empty row

grid.get_rows().add(row);
}

The markup for the grid is

<ig:WebDataGrid ID=”wdgMarks” runat=”server” AutoGenerateColumns=”False”
DataSourceID=”edsMarks” EnableAjax=”False” Height=”350px” Width=”100%”
onrowadding=”wdgMarks_RowAdding” onrowsdeleting=”wdgMarks_RowsDeleting”>
<Columns>
<ig:BoundDataField DataFieldName=”SomeId” Hidden=”True” Key=”SomeId” >
<Header Text=”SomeId” />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName=”SomethingElse” Hidden=”True”
Key=”SomethingElse”>
<Header Text=”SomethingElse” />
</ig:BoundDataField>
<ig:TemplateDataField Key=”Mark”>
<Header Text=”Mark” />
<ItemTemplate>
<%# Goddard.DAL.Utility.IntToBase26((int)DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, “Mark”))%>
</ItemTemplate>
</ig:TemplateDataField>
<ig:BoundCheckBoxField DataFieldName=”Enhanced” Key=”Enhanced”>
<Header Text=”Enhanced” />
</ig:BoundCheckBoxField>
<ig:BoundDataField DataFieldName=”DateModified” Key=”DateModified”>
<Header Text=”DateModified” />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName=”ModifiedBy” Key=”ModifiedBy”>
<Header Text=”ModifiedBy” />
</ig:BoundDataField>

</Columns>
<ClientEvents KeyDown=”wdgMarks_Grid_KeyDown” />
<Behaviors>
<ig:EditingCore AutoCRUD=”False” BatchUpdating=”True”>
<Behaviors>
<ig:RowAdding Enabled=”False”>
</ig:RowAdding>
<ig:RowDeleting />
</Behaviors>
</ig:EditingCore>
<ig:Selection CellClickAction=”Row” RowSelectType=”Single”>
</ig:Selection>
<ig:RowSelectors>
</ig:RowSelectors>
</Behaviors>
</ig:WebDataGrid>

and that all seems to work fine.

However, when I post-back I get an error stating that

Line: 4211
Error: Sys.InvalidOperationException: Cannot serialize non finite numbers.

 

That happens a few times, then the page does it’s postback, but none of the grid update events are fired.

Please advise.

Sign In to post a reply

Replies

  • 0
    Darren
    Darren answered on Feb 7, 2013 11:52 AM

    Found the problem, the row adding, i was not starting at 0, once i do that works fine.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Darren
Favorites
0
Replies
1
Created On
Feb 07, 2013
Last Post
13 years, 6 months ago

Suggested Discussions

Created by

Created on

Feb 7, 2013 11:52 AM

Last activity on

Feb 26, 2026 7:14 PM