Hide/show property definition of PropertyList<T>

Vote:
 

Hi,

I have an existing specialized property list of a custom class with 2 properties ie Name & Email.

As part of refactoring:

  • Name to be split into first ,middle ,last name
  • Email to be replaced with email address.

With the above changes ,I needed a schedule job migration activity. To migrate the existing name & email properties to the newly added ones,I had to keep the existing properties for which i decorated the properties with [Ignore].

The migration activity was successful.Name is now split into 3 & email replaced with email address.

Now, the problem here is,as the two old columns (name,email) is no longer used & was just used for migration activity,I need a way to hide these two columns completely.

Including [ScaffoldColumn(false)] to the property works but not completely.This will only hide the properties when adding/editing new items to it.

        [Ignore]
        [ScaffoldColumn(false)]
        public virtual string Name { get; set; }
        
        [Ignore]
        [ScaffoldColumn(false)]
        public virtual string Email { get; set; }

When I add new items to this custom property ,the two colums is not visible which is the expected behavior.

But, this is not the case where the property values are listed.The old columns are still visible.

So, my question is, is there a way to hide properties completely?Or do i have to wait for the next release of the application wherein i remove them from the code & deploy the changes?There is no point in keeping it in the list itself as it is obselete now.

Any input is appreciated. 

Regards.

#258408
Jul 03, 2021 9:38
Vote:
 

Hi,

Since these properties are created in the database so the only way to hide them from CMS view is to remove them from the code and then delete it from Admin->Content Type section

#258469
Jul 05, 2021 7:55
Farhin - Jul 07, 2021 12:49
This was exactly what i was looking for. Thank you for the response. The link to the thread really helped for what was wrong with my implementation.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.