access yiiGridView settings

Well i saw in the source of yiigridview.js that


$.fn.yiiGridView.settings['grid-id']

is getting deprecated, so what will be the new way of accessing a gridview’s settings after it has been set up in the view?

Can anyone help me with this? I couldn’t figure it out by looking at the source, not very good in javascript :)

Actually there is no "new" way for this, can you explain what is the need to have access to whole settings?

@mdomba, for example there was this question recently in stackoverflow, asking how to remove event handlers, and assign own event handler for a gridview.

For which we can use jquery’s off method.

Example:




$(document).off('click.yiiGridView',$.fn.yiiGridView.settings['example-grid'].updateSelector);



I understand that i can hard code the updateSelectors, but won’t code be easier to maintain if we could dynamically pass the value?

If the problem is in the selector, maybe adding an option for a custom selector instead of "document" would be enough ?

I’m not sure that i understand you clearly, where should this custom selector option be included?

This is not implemented currently… It would be included in the JS file like other options (updateselector for example)…

well that sounds good :)