Kinetic/AppStudio - Work with grid columns title

I have a need to rename the grid column names dynamically with month like "September”, “October” …

image

Is it possible to rename grid column header programmatically, preferably with variables?

Thanks!

1 Like

I tried {Constant.Month} but it did not work :sob:

Like this:

Any solutions?

1 Like

I’m completely guessing here but can you figure out an event that you might be able to create a custom action on such as when the grid is loaded? Or perhaps the EpiDataView associated to the grid. Can you change the label associated to the columns that way? I’m not sure. I’ve never tried. But I’m interested in this as it has come up before. I’ve always just done something like +1 Month, +2 Months, etc. It got the job done. But wasn’t as pretty.

3 Likes

I’m out of office now but I would try to wrap your thing in double quotes and see if that helps. You can also try the same with any dataview field

1 Like

image

image

I tried single quotes and double quotes, but it did not work.

Mr. Long,

My plan for these queries was to rewrite it in SQL as a view in our non-Epicor db and bring it in as an External BAQ but never got around to it. I was looking into using unpivot rather than pivot but Epicor queries didn’t support it directly in query builder. But it might be possible with some events in the new kinetic layers as Dan suggested.

For context for everyone, currently it was being done in our c# customization layer but we are migrating these to kinetic.

1 Like

Found a solution for this. The key is Property-Set.

Try to find the GUID for the panel card grid. How to find that?

Step 1: Your gridID and GridModel should be same.
image
image

Step 2: Create a dummy button and create onClick event

Step 3: Inside the event, create a condition and put below expression

#trans.epEventService.epObjectManagerSvc.components.find(x => x.id == ‘grdLandingPage’).model.guid# === “”
Here, ‘grdLandingPage’ is your gridID

Step 4: On the condition true side, have a message event to show some text
Step 5: Preview it. Hit the button and find the GUID in console screen.
Step 6: Note down the GUID for the grid

Now the actual solution:
Quite simple, you just put property-set after form load or wherever you want and set something like below,

image
Here, you have to paste the copied GUID in both places, then

image
Here, [0] refers to your column position

Happy epicoring…! :wink:

4 Likes