Connecting Tech Pros Worldwide Help | Site Map

create dynamic properties for an object.

Keshav
Guest
 
Posts: n/a
#1: Nov 16 '05
Hi all


I have a Class "Sample" with following properties

PropertyA
ProeprtyB
ProeprtyC

I am binding the sample object to property grid so that i can edit the
proeprties.
Now in the above scenario i have to make ProeprtyC to be visible only if
proeprty B is set.

Pls advice me on this. It would be great help if i get code sample.

Thanks
Keshav


Peter Rilling
Guest
 
Posts: n/a
#2: Nov 16 '05

re: create dynamic properties for an object.


You can't really make a property visible or not visible based on context.
What you can do is to throw an InvalidOperationException, for example, if
the context is not correct. It would really up to the code using the class
to make sure the context is correct.

"Keshav" <kmurthy2@covansys.com> wrote in message
news:%23tyJH2FTEHA.2480@TK2MSFTNGP10.phx.gbl...[color=blue]
> Hi all
>
>
> I have a Class "Sample" with following properties
>
> PropertyA
> ProeprtyB
> ProeprtyC
>
> I am binding the sample object to property grid so that i can edit the
> proeprties.
> Now in the above scenario i have to make ProeprtyC to be visible only if
> proeprty B is set.
>
> Pls advice me on this. It would be great help if i get code sample.
>
> Thanks
> Keshav
>
>[/color]


Closed Thread