Search code examples
shieldui

How to set grid column title in dynamic way without using refresh function


I got requirement to set column title per condition. No Grid method allows me to set column title after table gets rendered. I tried with setting new title via manipulating its value in options. But after that, I'll need to call refresh() method to show my new title. Because in the grid, I always have some columns hidden dynamically. Refresh() method will make these hidden columns showing again on the screen and I don't want it. So, is there a way to set new value to column title? Thanks.


Solution

  • For hiding individual columns, you can use the hideColumn, showColumn and isHidden methods.

    You can also use the visible column property to set column visibility at initialization time.

    There is no setTitle() method currently implemented, but you can email Shield UI's support and ask them to implement that for you. Depending on their load, they might do it real quick.

    Until that is implemented, you can always update the title by using jQuery.