cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Automatically invisible rows by click other buttons

DenGrz
8-Gravel

Automatically invisible rows by click other buttons

Hello,

 

i want to create a layout, how you see it on the picture. 

If i click on the "1. Button" the row with "Test_1" und "Test_2" is then visible.

Now when i click on the "2.Button" when have to open the next row. 

That i managed already. 

 

Now then i click on the "2.Button" the row with "Test_1" and "Test_2" have to automatically invisible.

How can i achieved that?

 

Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions

Thanks for the fast reply.

That´s a good idea, i try it.

View solution in original post

4 REPLIES 4
micah
12-Amethyst
(To:DenGrz)

What's the code you used for the buttons?

sebben
12-Amethyst
(To:DenGrz)

Hi,

you can hide all your elements and show only those in the row. You can use a script like this for example:

$scope.Click=function(_number){
      for(var j=2; j<= 9; j++){
    $scope.app.view.Home.wdg["label-"+j].visible = false;
      }
        switch(_number){
            case 1:
            $scope.app.view.Home.wdg["label-2"].visible = true;
            $scope.app.view.Home.wdg["label-3"].visible = true;
            break;
            case 2:
            $scope.app.view.Home.wdg["label-4"].visible = true;
            $scope.app.view.Home.wdg["label-5"].visible = true;
            break;
            case 3:
            $scope.app.view.Home.wdg["label-6"].visible = true;
            $scope.app.view.Home.wdg["label-7"].visible = true;
            break;
            case 4:
            $scope.app.view.Home.wdg["label-8"].visible = true;
            $scope.app.view.Home.wdg["label-9"].visible = true;
            break;
        }
}

You would call the function then from then from then first button with Click(1); from the second with Click(2); etc.

If you don't have your elements numerated like this you can also hide them individually or make an array of them and loop through it.

Hi @DenGrz ,

 

it can be done with javaScript as mention by   but there is also simple option using the Tab widget. In some cases, it could be ok as shown on the picture:

 

2020-04-23_17-18-47.jpg

So here you need to add the Tab widget and add for the different functionality different Tabs where you place the different buttons, checkbox ... etc. The show and hide of the groups is then done by the widget default functionality.

Thanks for the fast reply.

That´s a good idea, i try it.

Announcements

Top Tags