Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASP .NET] If the source contains a 'decimal' type, the grid will throw an error and not render #610

Open
IvanPeevski opened this issue Mar 24, 2023 · 0 comments

Comments

@IvanPeevski
Copy link

IvanPeevski commented Mar 24, 2023

If the source of the jqxgrid contains a 'decimal' type, the automatically generated JS code will omit the value of this item property.

Example: If the source is made up of this object:

public record Model {
        public int Id { get; init; }
        public string Name { get; init; }
        public decimal Budget { get; init; }
        public DateTime StartDate { get; init; }
 }

an item of the generated JS will look like this:
{ 'Id': 4, 'Name': 'Joe', 'Budget': , 'StartDate': new Date(2023, 2, 20, 0, 0, 0, 0) }

This is invalid JS syntax, which causes the jqxgrid to not render

Replacing 'decimal' with 'double' resolve the issue

Demo:
aspnet_issue.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant