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

Changing configuration options at runtime #386

Closed
charleskilbourne opened this issue May 2, 2013 · 7 comments
Closed

Changing configuration options at runtime #386

charleskilbourne opened this issue May 2, 2013 · 7 comments

Comments

@charleskilbourne
Copy link

looking at issue 287(#287) it makes it seem that it is possible to change boolean variables during runtime, however after playing around with it, it seems that these variables are only configurable and initialization of the gird. Is there anyway to do this in the current state?

Here is a plunk attempting a version of what I want to do, it tries to toggle the selection checkbox with the click of a button
http://plnkr.co/edit/jTLnF2?p=preview

@c0bra
Copy link
Contributor

c0bra commented May 6, 2013

Currently, no it doesn't appear to be possible as a lot of the config options are internalized when the grid is initialized and the grid doesn't watch for them to be updated.

@azountas
Copy link

Is it possible to have some of them configurable? I am interested especially in i18n.

@c0bra
Copy link
Contributor

c0bra commented Sep 20, 2013

@azountas You mean like swapping out translations without refreshing the page?

@azountas
Copy link

Yes. Is this possible?

@azountas
Copy link

If you consider doing this, please consider the ability to change column headers (property displayName) dynamically.

@somelinguist
Copy link

Is it possible to change i18n at runtime? I saw a comment in issue #287 that suggests that it is possible to change languages "on the fly", but there was no explanation of how to do so. I tried just changing the value of gridOpts.i18n, but that doesn't work.

@rahsm
Copy link

rahsm commented Oct 27, 2013

It seem's that the i18n isn't really watched, but you can use this to change the localization of ng-grid at runtime:
$scope.gridOptions.$gridScope.i18n = window.ngGrid.i18n['en'];
for english and e.g.
$scope.gridOptions.$gridScope.i18n = window.ngGrid.i18n['de'];
for german :)
HTH

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

No branches or pull requests

6 participants