cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove the Check box in AnalyticalTable (embedded into SmartTable)?

Jayakrishnan
Active Participant
0 Kudos

Hi Experts,

    I am working on the Personalization Controller - Analytical Table with Smart table. i am getting the check boxes in the view for each item. i would like to disable the select option in the analytical table. How do i achieve this?



Thank you,

Regards,

JK

Message was edited by: Jayakrishnan Chandramohan

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi JK,

You can try something like this:


var oSmartTable = this.getView().byId("oSmartTable");     //Get Hold of smart table

var oAnalyticalTable = oSmartTable.getTable();          //Analytical Table embedded into SmartTable

oAnalyticalTable.setSelectionMode("Single");

Unfortunately, Analytical table doesn't support selection mode as 'None'.

Regards,

Sai Vellanki.

Jayakrishnan
Active Participant
0 Kudos

Thank you for your reply, it is working. Can i restrict the column width for each value. It is occupying more width for all values.

saivellanki
Active Contributor
0 Kudos

JK,

Here you go:


var oSmartTable = this.getView().byId("oSmartTable");     //Smart Table

var oAnalyticalTable = oSmartTable.getTable();          //Analytical Table

var oColumns = oAnalyticalTable.getColumns();       //Columns with Array Type

oColumns[0].setWidth("10%");          //Change First Column width

//Likewise, you can change the width of other columns   

Regards,

Sai Vellanki.

Jayakrishnan
Active Participant
0 Kudos

Once i apply this code, i cannot adjust the column width in the screen.. or shall we disable that control? and after pressing the restore button, it again set the default width.

saivellanki
Active Contributor
0 Kudos

You should be able to adjust.

Is this what you're expecting?

Regards,

Sai Vellanki.

Jayakrishnan
Active Participant
0 Kudos

Yes, this is what i needed. But Still i am not getting the output. Even i applied the same code which you have pasted as gif image. i have inspected the UI explored tab and tried. but no luck i dont know what mistake i have done?

saivellanki
Active Contributor
0 Kudos

JK,

Check the ID of Analytical table, I guess you are passing wrong ID.

Regards,

Sai Vellanki.

Jayakrishnan
Active Participant
0 Kudos

Yes , i got it.  in the SAPUI5 explored page while inspecting. But in  my application i am not getting the change. Please see the images

Message was edited by: Jayakrishnan Chandramohan

Message was edited by: Jayakrishnan Chandramohan

Answers (1)

Answers (1)

Former Member
0 Kudos

set property selectionMode to sap.ui.table.SelectionMode.None

regards

Jayakrishnan
Active Participant
0 Kudos

None type is not get supported in Analytical Table