<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Populate grid table SAPUI5 dynamically in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547879#M115963</link>
    <description>&lt;P&gt;Thankyou &lt;A href="https://answers.sap.com/users/6550/ben-yslim.html"&gt;Yen Shen, Ben Lim&lt;/A&gt;,&lt;/P&gt;
  &lt;P&gt;Yes, you need to create an sap.ui.table.Table in your XML view, after that, you have to bind the data (your dat) to the table, as you said your data will be dynamic. To bind dynamic value to each cell, you can use the bindRows method, wherein you can bind the whole row of the table.&lt;/P&gt;
  &lt;P&gt;Also you can use the cellClick method to handle the click event of any cell.&lt;/P&gt;
  &lt;P&gt;In the controller, just set the model to your table and you are good to go, for your application.&lt;/P&gt;
  &lt;P&gt;Hope this helps,&lt;/P&gt;
  &lt;P&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2017 05:34:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-11-02T05:34:39Z</dc:date>
    <item>
      <title>Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaq-p/547876</link>
      <description>&lt;P&gt;Hi Expert, &lt;/P&gt;
  &lt;P&gt;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. &lt;/P&gt;
  &lt;P&gt;&lt;A href="http://jsfiddle.net/6qkdP/2/" target="test_blank"&gt;http://jsfiddle.net/6qkdP/2/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;May I know which control available in SAPUI5 able to achieve this objective. &lt;/P&gt;
  &lt;P&gt;I've tried 'sap.ui.table' but was getting error "method "addRow" cannot be used programmatically!" while generating the grid. &lt;/P&gt;
  &lt;P&gt;How should I design XML view as the view will be generated dynamically?&lt;/P&gt;
  &lt;P&gt;Any help would be much appreciated. &lt;/P&gt;
  &lt;P&gt;Thanks. &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;-Ben-&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 02:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaq-p/547876</guid>
      <dc:creator>benlim</dc:creator>
      <dc:date>2017-11-02T02:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547877#M115961</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 03:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547877#M115961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-02T03:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547878#M115962</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;arjun_9&lt;/SPAN&gt;, &lt;/P&gt;
  &lt;P&gt;Appreciate your comment. Is there any control in XML view to be created? Is it the table creation is done via in controller? I've checked on the sap.ui.table.Table documentation, to add row, we need to have data binding. But for my case, the data to be populated in each cell will by dynamic. How can I bind these dynamic value to each cell?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 04:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547878#M115962</guid>
      <dc:creator>benlim</dc:creator>
      <dc:date>2017-11-02T04:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547879#M115963</link>
      <description>&lt;P&gt;Thankyou &lt;A href="https://answers.sap.com/users/6550/ben-yslim.html"&gt;Yen Shen, Ben Lim&lt;/A&gt;,&lt;/P&gt;
  &lt;P&gt;Yes, you need to create an sap.ui.table.Table in your XML view, after that, you have to bind the data (your dat) to the table, as you said your data will be dynamic. To bind dynamic value to each cell, you can use the bindRows method, wherein you can bind the whole row of the table.&lt;/P&gt;
  &lt;P&gt;Also you can use the cellClick method to handle the click event of any cell.&lt;/P&gt;
  &lt;P&gt;In the controller, just set the model to your table and you are good to go, for your application.&lt;/P&gt;
  &lt;P&gt;Hope this helps,&lt;/P&gt;
  &lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 05:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547879#M115963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-02T05:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547880#M115964</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;arjun_9&lt;/SPAN&gt;,&lt;/P&gt;
  &lt;P&gt;I'm able to bind the row dynamically as for now. But how could I declare the columns in xml view? In my current xml view, I've add column name {name}. How could I achieve to make it populate dynamically? &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84362-1.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 08:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547880#M115964</guid>
      <dc:creator>benlim</dc:creator>
      <dc:date>2017-11-03T08:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547881#M115965</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/6550/ben-yslim.html"&gt;Yen Shen, Ben Lim&lt;/A&gt;,&lt;/P&gt;
  &lt;P&gt;You can give an id to your column, and from your controller's init function, you can set the table header using the foll code :&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourColumID&amp;gt;.setHeader(new sap.m.Label({text:modelTableHeader.oData.COLUMN1}));&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Hope this helps,&lt;/P&gt;
  &lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 08:58:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547881#M115965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-03T08:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547882#M115966</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;You can bind your table to a JSon model. please look at this example : &lt;A href="https://stackoverflow.com/questions/21731176/dynamic-binding-of-table-column-and-rows"&gt;https://stackoverflow.com/questions/21731176/dynamic-binding-of-table-column-and-rows&lt;/A&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 12:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547882#M115966</guid>
      <dc:creator>Joseph_BERTHE1</dc:creator>
      <dc:date>2017-11-03T12:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Populate grid table SAPUI5 dynamically</title>
      <link>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547883#M115967</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;
  &lt;P&gt;I managed to populate the grid dynamically. &lt;/P&gt;
  &lt;P&gt;Below are my xml view and controller. &lt;/P&gt;
  &lt;P&gt;Thanks to &lt;SPAN class="mention-scrubbed"&gt;arjun_9&lt;/SPAN&gt; and &lt;SPAN class="mention-scrubbed"&gt;joseph.berthe&lt;/SPAN&gt; for your guide. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84443-1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84444-2.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 11:35:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/populate-grid-table-sapui5-dynamically/qaa-p/547883#M115967</guid>
      <dc:creator>benlim</dc:creator>
      <dc:date>2017-11-06T11:35:47Z</dc:date>
    </item>
  </channel>
</rss>

