Row column headers in a table: hiding or changing width.

I have a table that has a row column header that I'd like to hide when a user selects an option to show or hide. I could either hide it or set its width to 1 ( or 0 if that's valid).


I haven't figured out how to do that in script. I am able to set the width property of the column in the dashboard ready event as below.


var custPartNoRow = table1.control.rowHeaderColumns.filter( function( item ){ return item.hierarchyUniqueName == "custPartNo"; } )[0];

custPartNoRow.width =1;


But the width of the column does not change. I may be changing it in the wrong place or I need to refresh the table somehow.


Thanks,

Matt

1 Like

It probably does change, you just have to refresh. Try adding a loadData call at the end:

table1.loadData();

And yes, you can set it to 0.


Another option is to display the table as a Flat Table and toggle the visibility on and off:

table1.control.columns[0].isVisible = false