cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a control at header level in TableSelectDialog?

VenkyM
Participant
0 Kudos

Hello,

I want to add a Checkbox at the header level of sap.m.TableSelectDialog,which is not available in standard control.

I know we can achieve by extending a standard control but I am not sure whether I can add it in aggregation level or property level in metadata section.

Please guide or provide me any reference link.

Regards,

venkatesh.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Instead of tableSelectDialog , you can simply use Dialog.

In the dialog , you can use <f:DynamicPage> in , it contains header and you can add controls there

you can refer to following fragment example:

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
	<Dialog title="Sample">
		<Text text="Sample text other than table" />
		
		<Table id="viewtable" headerText="Comapany Info" class="sapUiResponsiveMargin" width="auto"
			items="{/data}">
			<headerToolbar>
				<Toolbar>
					<Title text="Search Document Number"/>
					<ToolbarSpacer/>
					<SearchField width="50%" search="onSearch"/>
				</Toolbar>
			</headerToolbar>
			<columns>
				<Column  hAlign="Center">
					<Text text="Item1"/>
				</Column>
				<Column  hAlign="Center">
					<Text text="Item2"/>
				</Column>
				<Column  hAlign="End" demandPopin="true" minScreenWidth="small">
					<Text text="Item3"/>
				</Column>
				<Column  hAlign="End" demandPopin="true" minScreenWidth="small">
					<Text text="Item4"/>
				</Column>
				<Column  hAlign="End" demandPopin="true" minScreenWidth="small">
					<Text text="Item5"/>
				</Column>
			</columns>
			<items>
				<ColumnListItem type="Navigation" press="onPress">
					<cells>
						<Text text="{item1}"/>
						<Text text="{item2}"/>
						<Text text="{item3}"/>
						<Text text="{item4}"/>
						<Text text="{item5}"/>
					</cells>
				</ColumnListItem>
			</items>
		</Table>
		<endButton>
			<Button text="Cancel"  press="onClose" />
		</endButton>
	</Dialog>
</core:FragmentDefinition>

🙂

Best Regards,

Rajvardhan Thakare

VenkyM
Participant
0 Kudos

Hi Rajvardhan,

Thanks for your response.

In my application I am uisng Input with Value Help and for value help I am using TableSelctDialog,it also incudes search functionality as well.

I am not surewhether it will suit for my requirement.

Best Regards,

venkatesh.

VenkyM
Participant
0 Kudos

Hi Rajvardhan,

I tried with the above code and it suited my requirement. Thank you.

Regards,

Venkatesh.

Answers (0)