I have page with a ListGrid that allows the user to change the language of the text. The text is contained in a static text file in JSON format. Basically, when the user changes the language (using a menu option) I make a call to read the appropriate text file and set the field titles.
grid.setFieldProperties("number", {title: resources.number})
The problem I have is, if the user has hidden a column the title change is not reflected when they un-hide it. The name of the column that appears in the popup menu also does not change. As long as the column is visible it works fine.
Is there something I have to call to tell SmartClient that the title has changed when it is not visible?
Thanks
It looks like setFieldProperties() won’t change values for hidden fields. We’ll fix this.
Another approach is to setFields() with a new set of fields, or, as a temporary workaround, access the field via grid.completeFields (undocumented) to change it.
I don’t think I can use setFields because if the user has already made other changes (such as hidding/displaying a column, resizing, etc) then I lose that. Unless I loop through the existing columns and get the current settings but that would quickly become a nightmare.
I have at least a month of development before rollout so as long as it is being addressed I can live with the problem.
Thanks
This has been fixed in mainline - setFieldProperties() will now work on hidden fields when you pass it the string key