This project is read-only.

ViewsOnOff Helper 

This control needs reference to MVCControlToolkit.Controls.Core-x.x.x.js.

The ViewsOnOff Helper detach and attach  all html elements with a given CSS class from the Dom. The attached/detached state of the elements depends on the checked/unchecked state of a related chechbox. The checkbox is associated with the elements to attach/detach by assigning it a CSS class obtained by postfixing th CSS class assigned to the elements to detach with "_checkbox".

The ViewsOnOff helper has just two arguments, the first one is the CSS class that defines the elements to attach/detach and a boolean tha specifies if the elements are initially attached (true) or detached(false).

When the View is posted the attached/detached state of all elements i stored, and re-used when the View is rendered again. In other terms the ViewsOnOff helper "remember" the attached/detached state of all elements between posts.

An example of use of the ViewsOnOff helper can be found at the end of the section about the DataFilter and DataFilterBuilder helpers.

Last edited Jun 22, 2014 at 11:53 AM by frankabbruzzese, version 13


No comments yet.