Get Free Trial

Align String data type columns to right

Ravi Kumar asked on January 20, 2021

Hi Flexmonster Team,

I tried to align the string data type column to right side using formats but it is not working.
I’m providing the data and the formats i used please check and provide any solution.
I need to align the “Revenue” string column data to right side. Please suggest.
Formats Array: 
{name: “Revenue”, textAlign: “right”}
Ravi Kumar

2 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 21, 2021

Thank you for reaching out to us.
We want to explain that the specific field is linked with its formatting object using the format property:

slice: {
    uniqueName: "Revenue",
    format: "formattingName"

The same name should be specified as a value of the Format Object:

    "name": "formattingName",
    "textAlign": "right"

You are welcome to see the JSFiddle demonstrating this approach:
More information about the ways to define formatting can be found in our documentation.
Please let us know if it helps.
If the desired functionality differs from the described one, or the provided approach does not work for your configuration, please modify the provided JSFiddle to demonstrate the issue. This will allow us to find a suitable solution for your specific case.

Ravi Kumar January 21, 2021

Hi Illia,
It suits our requirement.
I didn’t added format name in slice property instead provided direct “Revenue” to the name in formats.
It works fine.
Ravi Kumar

Please login or Register to Submit Answer