Skip to Content

Populate grid table SAPUI5 dynamically

Hi Expert,

I would like to implement development in SAPUI5 whereby user able to enter number of column and grid to be generated. The grid should triggered an event to pop up message whereby which column and row is clicked.

http://jsfiddle.net/6qkdP/2/

May I know which control available in SAPUI5 able to achieve this objective.

I've tried 'sap.ui.table' but was getting error "method "addRow" cannot be used programmatically!" while generating the grid.

How should I design XML view as the view will be generated dynamically?

Any help would be much appreciated.

Thanks.

Regards,

-Ben-

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 06, 2017 at 11:35 AM

    Hi All,

    I managed to populate the grid dynamically.

    Below are my xml view and controller.

    Thanks to Arjun Biswas and Joseph BERTHE for your guide.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2017 at 03:55 AM

    May be you can extend the sap.ui.table.Table control, to achieve your objective in SAPUI5. You can use the "attachRowSelectionChange" method to get which row is selected in the table.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2017 at 12:49 PM

    Hello,

    You can bind your table to a JSon model. please look at this example : https://stackoverflow.com/questions/21731176/dynamic-binding-of-table-column-and-rows

    Regards,

    Add comment
    10|10000 characters needed characters exceeded