cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to modify grid column title at runtime?

cdu
1-Visitor
1-Visitor

How to modify grid column title at runtime?

I can modify column title at design time, but how to modify it at run time?

4 REPLIES 4

You can't at runtime, but you can do a trick with a localization name, you can set the title to a localization name, and change title through changing localization token content.

Best Regards,

Carles.

Hey Carles can you give an example on how you did this? I created a new token with the name of the infotable field name, but when I went to change the grid config, I tried "toggling" the column title to localization and left the text box next to it empty, but it reverts back after saving. Do I need to put something in there? If so, what? It will be different based on the info table being bound (I am dynamically changing the data shape at runtime).

Thanks!

ankigupta
12-Amethyst
(To:yevans)

Hi Yale Evans​,

As Infotable DataShape is changing at runtime; you might be using the Show All column property of the Grid widget.

So, as an alternative; you can use Rename Field to rename the Infotable field name and then show it in the grid.

var params = {

    t: "InfoTableName" /* INFOTABLE */,

    from: "OldFieldName" /* STRING */,

    to: "NewFieldName" /* STRING */

};

// result: INFOTABLE

var result = Resources["InfoTableFunctions"].RenameField(params);

I hope it helps.

Yes, thanks so much!

Announcements


Top Tags