This is a migrated thread and some comments may be shown as answers.

How to show or hide primitive type and compound type at runtime?

1 Answer 51 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Veteran
Steve asked on 14 Jan 2020, 10:02 AM

I have a business object ,

public class Person
{
public string Name {get;set;}
public bool Show {get;set;}
public class Company {get;set;}
}
 
public class Company
{
public string Name {get;set;}
public string Address {get;set;}
}

 

I expect that Company will hide when the Show is false, and vise versa.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Jan 2020, 01:36 PM
Hello, Steve,    

I would recommend you to refer to the following forum thread that you have opened on the same topic: https://www.telerik.com/forums/show-or-hide-some-property-at-runtime 

It is demonstrated how to handle the Edited event and when a certain property is changed you can hide other properties by manipulating the PropertyGridItem.Visible property of the respective affected field.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
PropertyGrid
Asked by
Steve
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or