Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWText to show html table not work now!
#2
Hello,

Let me explain further as follows.

Below is the html code I used to give values to IWText.text

Code:
  <table class="table">
    <thead>
      <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Email</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>John</td>
        <td>Doe</td>
        <td>john@example.com</td>
      </tr>
      <tr>
        <td>Mary</td>
        <td>Moe</td>
        <td>mary@example.com</td>
      </tr>
      <tr>
        <td>July</td>
        <td>Dooley</td>
        <td>july@example.com</td>
      </tr>
    </tbody>
  </table>

And below image is result :
[Image: GkO1RR.jpg]
When I use :
- OnClick of button to give value to IWText.text --> show table normal
- OnAsyncClick of button to give value to IWText.text --> not show table, show only data in table

Below is sample code in event OnClick or OnAsyncClick of button

Code:
  TXTLISTGRID.Text := '';

  TXTLISTGRID.Text :=
    '<table class="table"> ' +
      '<thead> ' +
        '<tr> ' +
          '<th>Firstname</th> ' +
          '<th>Lastname</th> ' +
          '<th>Email</th> ' +
        '</tr> ' +
      '</thead> ' +
      '<tbody> ' +
        '<tr> ' +
          '<td>John</td> ' +
          '<td>Doe</td> ' +
          '<td>john@example.com</td> ' +
        '</tr> ' +
        '<tr> ' +
          '<td>Mary</td> ' +
          '<td>Moe</td> ' +
          '<td>mary@example.com</td> ' +
        '</tr> ' +
        '<tr> ' +
          '<td>July</td> ' +
          '<td>Dooley</td> ' +
          '<td>july@example.com</td> ' +
        '</tr> ' +
      '</tbody> ' +
    '</table> ';
Reply


Messages In This Thread
RE: IWText to show html table not work now! - by baxing - 11-20-2022, 02:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)