Try our conversational search powered by Generative AI!

GridView does not display the Category Name


I am using the Episerver.LabsGridView component and I have a string on the model to display a Category. The property uses the CategorySelectionFactory and the value shows up in the of my custom column renderer but the value is a string integer. How can I get this to display the actual selected category name? Has anyone run into this?

Dec 17, 2021 20:04

Hi Chris,

I haven't delved into this too much, however if it is returning a category id, then you should be able to use the 'CategoryReposity' in optimizely with the 'Get(int32)' method which will get you and instance of the category.

From here you can use 'Name' or 'Description' to get the text, be careful here as only 1 of these is the displayname of the category, i can't remember of the top of my head.


Dec 21, 2021 11:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.