PC Review


Reply
Thread Tools Rate Thread

Display list of user defined objects in propery grid

 
 
dushkin
Guest
Posts: n/a
 
      12th Feb 2012
Hi,

I know that to show class memebers in the property grid we need to
attribute each one of them with [Category("category name")].

But If I have a list, for example, of users (roughly) built in the
following way:

Class User {

public string name;
public int age;

}

private List<User> m_lstUsers;

and the m_lstUsers is the member I want to display in the property
grid, how do I do this?

When I attributted it with [Category("Mycategory")], then under the
"MyCategory" property I see something like <ClassName>.UsersListClass.
I hope it was clear enough.

Thanks!
 
Reply With Quote
 
 
 
 
Jeff Johnson
Guest
Posts: n/a
 
      12th Feb 2012

"dushkin" <(E-Mail Removed)> wrote in message
news:3727cb06-f484-4aab-a338-(E-Mail Removed)...

> I know that to show class memebers in the property grid we need to
> attribute each one of them with [Category("category name")].
>
> But If I have a list, for example, of users (roughly) built in the
> following way:
>
> Class User {
>
> public string name;
> public int age;
>
> }
>
> private List<User> m_lstUsers;
>
> and the m_lstUsers is the member I want to display in the property
> grid, how do I do this?
>
> When I attributted it with [Category("Mycategory")], then under the
> "MyCategory" property I see something like <ClassName>.UsersListClass.
> I hope it was clear enough.


Some links:

http://www.codeproject.com/search.as...lection&sbo=kw
(the search I ran)

http://www.codeproject.com/Articles/...with-Collectio
(start here)

http://www.codeproject.com/Articles/...a-in-a-Propert
(this might interest you, too, but I recommend the collection editor)


 
Reply With Quote
 
dushkin
Guest
Posts: n/a
 
      12th Feb 2012
On 12 פברואר, 17:34, "Jeff Johnson" <u...@yours.spammers> wrote:
> "dushkin" <talt...@gmail.com> wrote in message
>
> news:3727cb06-f484-4aab-a338-(E-Mail Removed)...
>
>
>
>
>
>
>
>
>
> > I know that to show class memebers in the property grid we need to
> > attribute each one of them with [Category("category name")].

>
> > But If I have a list, for example, of users (roughly) built in the
> > following way:

>
> > * * Class User {

>
> > * * * * public string name;
> > * * * * public int age;

>
> > * *}

>
> > * *private List<User> m_lstUsers;

>
> > and the m_lstUsers is the member I want to display in the property
> > grid, how do I do this?

>
> > When I attributted it with [Category("Mycategory")], then under the
> > "MyCategory" property I see something like <ClassName>.UsersListClass.
> > I hope it was clear enough.

>
> Some links:
>
> http://www.codeproject.com/search.as...lection&sbo=kw
> (the search I ran)
>
> http://www.codeproject.com/Articles/...d-Persist-Coll...
> (start here)
>
> http://www.codeproject.com/Articles/...play-of-collec...
> (this might interest you, too, but I recommend the collection editor)


Thanks! I will check those.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 PM.