Nick Wilsher
Posts: 0
Joined: Mon May 27, 2013 4:36 am

Grid element visibility within dynamic lists

Hi
I want to set visibility on & off for grid elements that are contained within dynamically populated list items. Visibility is to be controlled via button click events and applies to all items in the list. ie buttons control what data is shown in the list.

To do this I am setting the grid elements visibility parameter from the button click event. This works fine for a static list but not for a dynamic list

For a dynamic list I have tried adding a second event action that invokes the data service again to reload the list. This works for the first instance of the button event but none subsequently.

Any guidance appreciated

Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Grid element visibility within dynamic lists

Hi Nick,

You can use JavaScript to hide Grid.

For example, you have a Grid component named "dataGrid" in the List: Image

The following code will be executed on Hide button click:
codevar listItem = $(this).closest("li");
listItem.find("[name=dataGrid]").hide(); /code

Nick Wilsher
Posts: 0
Joined: Mon May 27, 2013 4:36 am

Grid element visibility within dynamic lists

Thanks Katya

My case was a little simpler. The button is external to the list and controls the grid visibility for all items in the list uniformly not on an individual row basis.

Your answer pointed me in the right direction though (ie learn JS & JQuery ! ). I have done it by setting a class to each grid element and using
$(".class").hide(). There are probably other / better ways but it will do for the moment.

Thanks again

Nick

Return to “Issues”