Avalados por :

Como alinhar o cabeçalho da descrição do material ao centro em uma tabela XML

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 1 Vistas
0
Cargando...

Olá Especialistas,

Por favor, encontre abaixo o código do arquivo XML para gerar uma tabela com algumas colunas.

Tenho um requisito para alinhar o cabeçalho da descrição do material ao centro e os elementos à esquerda.

Mas quando colo o código a seguir, meu cabeçalho também é alinhado à esquerda junto com os elementos, mesmo se eu der hAlign como Centro na etiqueta da Coluna. (Marcado em vermelho)

<Table xmlns="sap.m" id="idItemTable" class="tableBorder"

items="{/}" visible="true" inset="false" width="100%"

includeItemInSelection="false" showUnread="false" noDataText=""

showNoData="true" enableBusyIndicator="true" modeAnimationOn="true"

showSeparators="Inner" swipeDirection="Both" backgroundDesign="Translucent"

fixedLayout="false" showOverlay="false" select="" swipe="both"

growing="true" wrapping="true" growingThreshold="50">

<headerToolbar>

<Toolbar>

<ToolbarSpacer></ToolbarSpacer>

<Button icon="sap-icon://drop-down-list" press="handleViewSettingsDialogButtonPressed" />

</Toolbar>

</headerToolbar>

<columns>

<Column xmlns="sap.m" hAlign="Center" vAlign="Middle"

visible="true">

<Text xmlns="sap.m" visible="true" text="{i18n>MaterialNumber}"

textDirection="Inherit" wrapping="false" textAlign="Begin">

</Text>

</Column>

<Column xmlns="sap.m" vAlign="Middle" hAlign="Center"

visible="true" minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>MaterialDesc}"

wrapping="false" textAlign="Center">

</Text>

</Column>

<Column xmlns="sap.m" vAlign="Middle" hAlign="Center"

visible="true" minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>Openqty}"

wrapping="false">

</Text>

</Column>

<Column xmlns="sap.m" hAlign="Center" vAlign="Middle"

visible="true" minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>Uom}"

textDirection="LTR" wrapping="false" textAlign="Begin">

</Text>

</Column>

<Column xmlns="sap.m" vAlign="Middle" hAlign="Center"

visible="true" minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>Base}"

wrapping="false">

</Text>

</Column>

<Column xmlns="sap.m" hAlign="Left" vAlign="Middle" visible="true"

minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>TotalStock}"

textDirection="LTR" wrapping="false" textAlign="Begin">

</Text>

</Column>

<Column xmlns="sap.m" hAlign="Center" vAlign="Middle"

visible="true" minScreenWidth="Desktop" demandPopin="true">

<Text xmlns="sap.m" visible="true" text="{i18n>TotalStockValue}"

textDirection="LTR" wrapping="false" textAlign="Begin">

</Text>

</Column>

</columns>

<items>

<ColumnListItem xmlns="sap.m" visible="true" type="Inactive"

class="tableBorder" unread="false" selected="false" tap=""

detailTap="" press="" detailPress="">

<Text xmlns="sap

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

3 Respuestas

0
Cargando...

Olá Laxmi,

Você pode usar este código: SAPUI5 Explored

Cumprimentos,

RW

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Não funcionou!

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Olá,

Tente ajustar o código no arquivo css.

Inspeccione o elemento ajustado na parte de css e aplique as alterações feitas no arquivo css com o id correspondente.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?