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

on column resize ajax call #9

Open
ankurpatelnet opened this issue Apr 8, 2015 · 11 comments
Open

on column resize ajax call #9

ankurpatelnet opened this issue Apr 8, 2015 · 11 comments

Comments

@ankurpatelnet
Copy link

As i resize column there is a ajax call going as i have bind datatable with serverside call
I want to stop ajax call on column resize, please guide me a way out.

@dykstrad
Copy link
Contributor

dykstrad commented Apr 8, 2015

I haven't tested this plugin with the server side implementation of data tables, and don't have much experience with using data tables that way. What ajax calls are being made?

@ankurpatelnet
Copy link
Author

I have used "sAjaxSource" and used another plugin call scroller for scroll, whenever i goes down with scroll, if resize the column table goes to 1'st record with ajax call,i want to prevent them.

@omerman
Copy link

omerman commented Apr 9, 2015

Just define ajax as function, and if request hasnt changed from last one, do not forward the request to the server.

@omerman
Copy link

omerman commented Apr 9, 2015

when defining ajax as a function, u get a paramater that holds the draw Callback.. after the server responds, u apply the callback with given data.

@ankurpatelnet
Copy link
Author

$('#tableselector).on('column-sizing.dt', function (e, settings) {
settings.bAjaxDataGet = false;
});

Resolved issue.
Thanks...

@ankurpatelnet
Copy link
Author

comment in event
"_fnMouseUp": function (e) {
//this.s.dt.oInstance.fnAdjustColumnSizing();
}

@dykstrad
Copy link
Contributor

Thank you for looking into this everyone. I hope you have found an adequate solution to this problem.

@ankurpatelnet
Copy link
Author

Sure......and thanks for making wonderful plugin.

@fonini
Copy link

fonini commented Jun 10, 2015

Instead of this.s.dt.oInstance.fnAdjustColumnSizing();, you can call this.s.dt.oInstance.fnAdjustColumnSizing(false); to avoid de AJAX call.

@dykstrad dykstrad reopened this Jun 25, 2015
@dykstrad
Copy link
Contributor

I am reopening this, this process should be accounted for in the future and setting the this.s.dt.oInstance.fnAdjustColumnSizing(false) will be allowed through a property of colResize

@dykstrad
Copy link
Contributor

Sorry I haven't had much time to develop this plugin as our company has moved on to other solutions with angular grid since we operate with Angular. I will continue to maintain pull requests, but I won't have much time to develop it myself.

I am hoping the community will step in an fix some of these problems as well.

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

4 participants