cancel
Showing results for 
Search instead for 
Did you mean: 

UI5 Table - value of context popup

Former Member
0 Kudos

Hello,

I'm taking my first steps with UI5 and especially with the table component. Everything works fine so far but now I have a question and till now I found no solution.

When I move my mouse over a column I see the value in this column again in a small popup. Now I want to display not the value from this specific column in the popup but the value from another column.

Example: Instead of displaying 5 times "Test11" when I move my mouse over the specific cell I want to display the value "5,904.4".

Is this possible? I searched the API documentation for table and column but found nothing useful. My guess is that I have to assign the value somewhere in my addColumn statement.

Any help is appreciated.

Regards

Jan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jan,

     Use tooltip property in table template.

Ex:

template: new sap.ui.commons.TextView({text:"{test1}", tooltip:"{name of the property to be displayed in tolltip}",

Regards,

Sushmita

Former Member
0 Kudos

Hey,

thanks for your suggestion! It works but I get a fixed popup for every column stating "Key Figure Popup". I want it flexible, meaning it should show the corresponding Number to the textfield. I tried adding the variable (val1) I use for the bindProperty function for the corresponding value column but without any success... Enhancing the bindProperty function with the tooltip property is also not supported I think...


//Text column

myTable.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text : "Some Text"}),

  template: new sap.ui.commons.TextView({tooltip: "{Key Figure Popup}"}).bindProperty("text", {path: "Text"}),

  sortProperty: "KeyFigure",

  filterProperty: "KeyFigure",

  width: "250px"

  }));

//Value column

myTable.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text :"Value"}),

  template: new sap.ui.commons.TextField().bindProperty("value", {path:  "val1",

   type: new sap.ui.model.type.Integer({

   maxIntegerDigits: 100,

   groupingEnabled: true,

   decimalSeparator: ".",

   groupingSeparator: ",",

   minFractionDigits: 1,

   maxFractionDigits: 1

   })}),

  sortProperty: "val1",

  filterProperty: "val1",

  width: "150px"

  }));

Do you have any further suggestions?

Regards

Jan

former_member182372
Active Contributor
0 Kudos

Not

"{Key Figure Popup}"}


but

{val1}



for tooltip binding

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Post details of the way you build the table