How to change options after creation

Tags: #<Tag:0x00007efc64e0bd40>

I need to use ‘renderAllRows:true’ option because of many data
but I also need all data to show up sometimes
Can I change the option after the table create dynamically?

Hi @likethis91

You can change most of the settings via updateSettings after the table is initialized.
However, renderAllRows is an option for rendering (it makes you load all the rows so there’s no need to load them on scroll) not for showing the rows. Can you tell me a bit more about how it works in your project?

1 Like

thank for your help but updateSettings not working in what i’m doing
I want my table to export the whole HTML to make new PDF file when some event occurs

so I used it like :
hot.updateSettings({
renderAllRows : true
})

but the table still drawing and removing HTML tags whenever I scroll
please give me some solution
I’ll wait for your help

And how do you get the HTML? From Handsontable v9.0.2 you can use a predefined toHTML() method that export all the data. Here’s an example https://jsfiddle.net/4kL87shb/2/

And the outcome is

<table><thead><tr><th>A</th>
... all other THs
<th>GR</th>
</tr></thead>
<tbody><tr><td >A1</td>
... all other TDs
<td >GR200</td></tr></tbody></table>

without the need to run renderAllRows.

1 Like

Hi @likethis91

How is the development going? Did you solve that case?
If you still need some guidance, we can exchange email (you can reach me at support@handsontable.com)

1 Like

I figured it out with ‘toHTML’ as you recommended Thanks
and I’m sorry to tell you that too late

It’s OK. I’m glad to hear that the issue is solved.