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

Add custom Data Fields to DataTablesAjaxPostModel #42

Open
nchelix opened this issue Feb 7, 2019 · 2 comments
Open

Add custom Data Fields to DataTablesAjaxPostModel #42

nchelix opened this issue Feb 7, 2019 · 2 comments

Comments

@nchelix
Copy link

nchelix commented Feb 7, 2019

I'm having to use the DataTablesAjaxPostModel in my implementation because there are too many columns and the "GET" query is too long. However, this method does not allow for passing back custom data points in the AJAX call as can be done with the GET function. Would be nice functionality to have those included in some ways if possible.

@VictorioBerra
Copy link
Contributor

VictorioBerra commented Feb 7, 2019 via email

@nchelix
Copy link
Author

nchelix commented Feb 7, 2019

I am currently working around it by using a query string for the extra stuff, however it's a bit clunky (currently using Request.Params[variable] to load it on the controller and that is working). I did attempt to build a wrapper ViewModel, and that passed back the additional custom data using the ajax: data and mapped to my additional fields, but the DataTablesAjaxPostModel in the ViewModel was coming back null so it failed. I could continue to use the query string option but was hoping as an enhancement it could be integrated into the existing DataTablesAjaxPostModel.

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

2 participants