Page 1 of 1

How to hide a button which is in a listitem?

Posted: Wed May 28, 2014 7:03 am
by Crystal

I put a json array into a listitem. Image
The interface is like this Image
Then I want to hide the button. Image
But it's not effective.
How to hide a button which is in a listitem?


How to hide a button which is in a listitem?

Posted: Wed May 28, 2014 10:28 am
by Illya Stepanov

Hi Crystal,

If you want to hide the button, on which you clicked, use this code:
precode
$(this).hide();
/code/pre

If you want to hide the whole grid component, inside which this button is, then this:
precode
$(this).parents("[name=gridName]").hide();
/code/pre
where 'gridName' - is the name of your grid component.


How to hide a button which is in a listitem?

Posted: Thu May 29, 2014 1:44 am
by Crystal

Hello,
Thanks,it works fine.

There I have another problems when I click this button.

Image

Then I want to hide or show this components.

Image


How to hide a button which is in a listitem?

Posted: Thu May 29, 2014 10:47 am
by Kateryna Grynko

Hi,

Sorry, not sure we understand. Are these components in a Grid?
Use the above code (for grid).


How to hide a button which is in a listitem?

Posted: Fri May 30, 2014 1:43 am
by Crystal

Hello,
These components are in a Grid.

Image

But the button is in another Grid.
I want to click this button to show or hide components in another Grid.

Image

So how to do?


How to hide a button which is in a listitem?

Posted: Fri May 30, 2014 3:57 pm
by Evgene Karachevtsev

Hello Crystal,

If you want to hide a whole grid you can use this code:

code $("[name='mobilegrid_4']").hide();
where mobilegrid_4 name of your grid /code