cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 Fragment Dialog with Fixed Toolbar and Scrollable Table

santosh51
Product and Topic Expert
Product and Topic Expert
0 Kudos
214

Hi Experts,

I have a simple requirement for a dialog which includes radiobutton groups, table and buttons.

I want the radiobutton group displayed at the top of dialog to be visible always irrespective of number of items in the following table. The buttons which are defined at the end of dialog is already working as expected, means it's always displayed in the dialog and not getting scrolled. But the radiobuttons are not working like this, they get scrolled whenever there are more items in the table. This is how my dialog structure looks. Could you please suggest how to achieve this functionality? 

 <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
<Dialog id="idDialog">
<VBox id="VB1">
<RadioButtonGroup id="idRBG1">
<RadioButton id="idRB1"></RadioButton>
<RadioButton id="idRB2"></RadioButton>
</RadioButtonGroup>
</VBox>
<VBox id="VB2">
<Table id="idTable"></Table>
</VBox>
<buttons>
<Button id="idB1"></Button>
<Button id="idB2"></Button>
</buttons>
</Dialog>
</core:FragmentDefinition>

View Entire Topic
Virinchy
Active Contributor
0 Kudos

try this @santosh51 , you may use FlexItemData instead of the static height on the scroll container, so When there are fewer table rows, the dialog shrinks automatically instead of taking a fixed height. Adjust the table data in the controller code shared in the example. 

https://plnkr.co/edit/hZXuWq8yHg9MdbzQ

Regards

Virinchy

santosh51
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Virinchy, Thanks for suggestion. I checked your new code, the table is getting shrinked automatically but then again the radiobuttons are also getting scrolled now. Can you check & suggest further please. The radiobuttons should be freezed always and dialog should get adjusted automatically as per the table items. Thanks in advance.