cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Smart table Creation

former_member466137
Participant
0 Kudos

Hello Experts,

I have a requirement to create dynamic table based on inputs from predecessor view...

sap.m.table is an alternative but i would like to try with Smarttable...

https://stackoverflow.com/questions/21014145/sapui5-sap-m-table-dynamic-creation

Any help with an example?

Accepted Solutions (0)

Answers (2)

Answers (2)

maheshpalavalli
Active Contributor

Hi hari_105

Smarttable will only work with predefined odata entityset(fixed structure) and with annotations.

It will not work with dynamic structure, so better to go with m.table or ui.table.table.

or I am missing something and would you like to provide more information to your requirement for better solution?

-Mahesh

0 Kudos

Hi Mahesh,

I have created to Screens for parent and child and i am able to display parent list in parent smart table, but when to display child screen based on parent id navigation i am not able display the data in child smart table

Parent entity set : /ParentEntityset - Data binded directly

Child entity set: /ChildEntity - Data binded with URL - /Child('1')/Details

How to bind child data to smart table.

Thank you.

jessicademarchi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, hari_105

You can use the class sap.ui.comp.smarttable.SmartTable(id?, settings?)

Something like this:

const smartTable = new sap.ui.comp.smarttable.SmartTable(
('smartTable-id'),
{
entitySet: 'yourEntity',
width: '100%',
enableAutoBinding: true,
tableType: 'ResponsiveTable',
useExportToExcel: false,
showFullScreenButton: true,
useTablePersonalisation: false
}
);

Here is the documentation where you can find all properties, methods, events...

Hope it helped.