cancel
Showing results for 
Search instead for 
Did you mean: 

Replace a column in UI5 on button click

Former Member
0 Kudos


Hello Experts,

I want to show a column on the click of a button.

There are 3 fields in the entity.  Name Marks Mobnum

Initially I am displaying only Name and Marks. I have a button on the press of which I need to show the Mobnum and hide the Marks.

In short, replace Marks with Mobnum.

I hid the Marks column but am unable to show the Mobnum.

Please advise.

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Pratik,

Might be there are lot of ways for doing this. But according to me below is the best way(considering you are using sap.m library controls ) :

What you can do create all the three columns and attach your data. But for the Mobnum column(sap.m.Column visible property) make visible=false. This means physically column is there but its not visible to user.

And when you press the button change visible=true for Mobnum and visible = false for Marks column.


if you still face any challenges reply the code snippets i will direct you where to make the changes.


Hope this helps you.


Cheers,

Viplove 


Former Member
0 Kudos

Thanks Viplove for your suggestion.

I displayed the further data in a separate view as it was just a demo app.

Answers (0)