November Happy Hour will be moved to Thursday December 5th.

GridView does not display the Category Name

Vote:
 

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 item.properties 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?

#268589
Dec 17, 2021 20:04
Vote:
 

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.

Paul

#268750
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.