Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

How to identify a column by uniqueName

Answered
Michael T Michael T asked on May 4, 2022

we have some formatting customizations using customizeCellFunction.
But want apply it only to a particular column.
Rather than hardcoding a columnIndex (which may change depending on the data / options) want to identify the column by the column's associated uniqueName.
Is there a way to do this?
 
Thank you,
 

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv ⋅ Flexmonster ⋅ May 5, 2022

Hello, Michael!
 
Thank you for writing to us.
 
Kindly note that you can get the column name in customizeCell function using the column.hierarchyName, for example:

function customizeCellFunction(cell, data){
data.columns.forEach(column => {
uniqueName = column.hierarchyName;
});
}

If you need to customize the column with a specific field value, you can use column.caption or column.uniqueName as well.
 
We have prepared a JSFiddle sample for visualization: https://jsfiddle.net/flexmonster/1xpgtsva/.
 
To get more information about customizing cells, please look through our docs: https://www.flexmonster.com/doc/customizing-grid/.
 
Hope it helps. Feel free to ask if any further questions arise.
 
Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv ⋅ Flexmonster ⋅ May 12, 2022

Hello, Michael!

Hope you are having a great week.
 
Our team is wondering if you had some time to try the suggested approach of identifying a column by uniqueName. Could you please let us know if our response helped?
 
Looking forward to hearing from you.

Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv ⋅ Flexmonster ⋅ May 19, 2022

Hello, Michael!

Hope you are doing well.

Just checking in to ask if our response helped you to identify a column by uniqueName.

We will be glad to hear your feedback.

Regards,
Solomiia

Please sign in or register to submit your answer