Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Initially td is filled by :

<td>
@((objectModel.propertyModel ==true ? "Yes" : ""))
</td>

Now on a button click Partial View is populated via ajax call on the same view but without any alteration to the above Table.

Still as soon as ajax call ends all the tds with value Yes turns out to NaN.00

What I have tried:

I am still figuring out how to reach the cause . i tried debugging but found nothing related to the table alteration that could cause this.

Please help.
Posted
Updated 24-Nov-16 22:20pm
v3
Comments
Jochen Arndt 25-Nov-16 6:26am    
I don't know anything about Ajax.

But "NaN.00" indicates that the item is treated as floating point value (NaN: Not a Number). It is probably returned by a parser that tries to convert the string "Yes" from the table cell to a floating point value.

objectModel.propertyModel might be returning the NAN value. Check the object value you have received in the ajax post.
 
Share this answer
 
v2
plz copy full code here to get better understanding
 
Share this answer
 
Comments
Abrar Kazi 25-Nov-16 0:32am    
that is the only code. Values are assigned once to the table and that's it no alteration whatsoever still to the table but on the same view an ajax call is made to display a partial view.
F-ES Sitecore 25-Nov-16 4:30am    
Given that the only code you are posting is showing a property isn't it pretty obvious the problem does not lie there but somewhere else. You've mentioned button clicks, ajax calls, partial views yet you say this simple line of code is the only relevant code there is? Please learn how to ask questions and to give sufficient amounts of information.

https://weblogs.asp.net/bleroy/asking-questions-is-a-skill

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900