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

Support Nested Json Data #203

Closed
phyllis0618 opened this issue Feb 14, 2016 · 7 comments
Closed

Support Nested Json Data #203

phyllis0618 opened this issue Feb 14, 2016 · 7 comments
Labels

Comments

@phyllis0618
Copy link

Hi,

I realize for the nested data like this
{name: "Address.city", type: "text"},

Read is fine, but when submit actually it does not write into db, and sorting, filtering are not work in this case.

BTW, if support the nested column for nested fields will be better, but that is more stretch.

Thanks

@tabalinas
Copy link
Owner

Nested fields should work for reading and for writing. If it doesn't work it's a bug. The issue is not clear. The thing is jsGrid doens't write data to db since it's client-side control. Would be great if you could provide an example (jsfiddle demonstrating the issue would be appreciated).
Thank you!

@phyllis0618
Copy link
Author

Please see the example here:
http://jsfiddle.net/38mrv9tf/

I use the nested fields and the data table can read, but add, sort and filter do not work.

Thanks!

@pramodachary
Copy link

Jsgrid sorting is not working fine with nested data model...Please fix this bug ASAP.

@tabalinas
Copy link
Owner

@pramodachary, could you please open a separate issue for this and provide an example?

@carlosalzate74
Copy link

Hey

I am using v.1.5.2 and sort is not working when using dot notation, was it fixed on the newer version?

This is how my object looks like:

[
{
"id": 24,
"user_id": 1,
"allowed": true,
"plan": {
"id": 1,
"planName": "Christmas"
}
}
]

BTW, thanks for this great component

@stevehn
Copy link

stevehn commented Aug 22, 2017

Any idea on how I can reconfigure jsGrid to recognize this json format?
{"ROWCOUNT":1,"COLUMNS":["ID","USER_ID"],"DATA":{"ID":[3],"USER_ID":["user1"]}}

I don't want to make another webservice for jsGrid if I don't have to.

@tabalinas
Copy link
Owner

@stevehn, it's a subject for a separate issue. A short answer would be: no need in a separate service, you always can remap data to expected format in the controller.loadData.

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

No branches or pull requests

5 participants