Unable to change a table's mode dynamically through code

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
Hi,

I'm attempting to dynamically re-render a 'readonly' table in 'edit' mode using code. I've referenced the following support thread when writing my code: https://community.skuidify.com/skuid/topics/how_to_make_a_table_component_read_only_dynamically.

Here's the code I'm using on my page:

var table = skuid.$('.myTableClass.nx-skootable:visible').data('object');
table.mode = 'edit';
table.list.render({doNotCache:true});


The table is re-rendered, however it will not change to edit mode (or vice-versa if I set it up the other way).

Thanks for the help!

Kartik
Photo of Kartik Sethuraman

Kartik Sethuraman

  • 798 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Try this:

var table = skuid.$('.myTableClass.nx-skootable:visible').data('object');
table.list.mode = 'edit';
table.list.render({doNotCache:true});
Photo of Kartik Sethuraman

Kartik Sethuraman

  • 798 Points 500 badge 2x thumb
Worked like a charm, thank you!