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

Change the width from a smarttable column

0 Likes
5,971

Hello,

its my first Application with SAPUI5 and JavaScript, so i try to work near the SAP Standards.

I created a smarttable with a Date on the leftside and some Boolean Values on the rightside. What i have to do is to resize the width from my Date Column because my View looks like this:

Following is my Coding of my View:

<IconTabFilter text="Headline">
<smartFilterBar:SmartFilterBar id="smartFilterBar" persistencyKey="UniqueAndStablePersistencyKey" entitySet="TESTSet" enableBasicSearch="true" liveMode="true">
<smartFilterBar:controlConfiguration></smartFilterBar:controlConfiguration>
<smartFilterBar:layoutData>
<FlexItemData shrinkFactor="0"/>
</smartFilterBar:layoutData>
</smartFilterBar:SmartFilterBar>
<smartTable:SmartTable id="smartTableRepair" height="100%" smartFilterId="smartFilterBar" entitySet="TESTSet" editable="false" header="Headline2" useVariantManagement="false" useTablePersonalisation="false" showRowCount="false" useExportToExcel="true"
initiallyVisibleFields="Ordernr" showFullScreenButton="false" demandPopin="false" beforeRebindTable="onBeforeRebindTable" enableAutoBinding="true">
<Table growing="true" growingScrollToLoad="true"></Table>
</smartTable:SmartTable>
<smartTable:SmartTable id="TESTSet" height="100%" smartFilterId="smartFilterBar" entitySet="TESTSet" editable="false" header="Testheader" useVariantManagement="false" useTablePersonalisation="false" showRowCount="false" useExportToExcel="true" initiallyVisibleFields="Ordernr" showFullScreenButton="false" demandPopin="false" beforeRebindTable="onBeforeRebindTable" enableAutoBinding="true">
<Table growing="true" growingScrollToLoad="true">
</Table>
</smartTable:SmartTable>
</IconTabFilter>

So my Question:

Is is possible to change the width of the column "date" in a Smarttable like i choose? Can somebody explain me how to do it in the view?

Thanks and Regards

Nils

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Likes

Hi nilslucas

Please use Width="SomeValue rem" like width="11rem" . It will work for your problem.

catano
Active Participant
0 Likes

Hi nilslucas,

Try one of the following to see which meets best to requirements:

  • Remove the Table from SmartTable and set tableType property of smartTable to 'ResponsiveTable'
  • Keep Table and define exact column widths inside it. Depending which one you use, sample for ResponsiveTable or GridTable

Regards,

Peter