PC Review


Reply
Thread Tools Rate Thread

A Couple of questions about the Property Grid

 
 
chris.dannemiller@gmail.com
Guest
Posts: n/a
 
      17th Jun 2006
1. I have a MDI document what is the best way to link data form a
specific MDI document to parameters of a property grid. In this case I
have a palette that can change from document to document, and I want my
customized color picker to support the diffrent palettes depending on
what document is active.

2. I have a large set of bjects that use a single class in the Property
grid, However the classes that derive this need to ensure that certain
parameters remain set when ConvertFrom is called because they are
static values.

- Christopher Dannemiller.

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      18th Jun 2006
Chris,

For #1, the easiest way to do this would be to create a class that
exposes the properties that you want which you can bind to the property
grid.

For #2, in your derived classes, just throw an exception when the
property is set with an invalid value. It will prevent the value from being
entered.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 1. I have a MDI document what is the best way to link data form a
> specific MDI document to parameters of a property grid. In this case I
> have a palette that can change from document to document, and I want my
> customized color picker to support the diffrent palettes depending on
> what document is active.
>
> 2. I have a large set of bjects that use a single class in the Property
> grid, However the classes that derive this need to ensure that certain
> parameters remain set when ConvertFrom is called because they are
> static values.
>
> - Christopher Dannemiller.
>



 
Reply With Quote
 
chris.dannemiller@gmail.com
Guest
Posts: n/a
 
      18th Jun 2006
This isn't exactly what I want, so let me try to explain what I am
trying to do.

I have a property that can bind to a set of data that the user can set
elsewhere in the document or here. So I want it to drop a list, using
the string converter if possible that looks something like this

+ SomeObject | Data
(Disabled)
OtherObjectA
OtherObjectB
OtherObjectC
(New Object)

When "(New Object)" is clicked I want it to create a window that
allows the users to create a new object and click Ok, naturally a
Cancel will be present too. This list of objects is unique for each
document. Additionally, the SomeObject has a filtering parameter that
tells it what objects can be used and what objects can not be used. It
sounds kind of counter intuitive from a Human Factoring stand point but
it actually will work in a very eloquent way. I am beginning to believe
that the only way to do this is with the "..." button but I wanted to
avoid that because about 90% of the time the user would select one of
the objects that already exists.

Nicholas Paldino [.NET/C# MVP] wrote:
> Chris,
>
> For #1, the easiest way to do this would be to create a class that
> exposes the properties that you want which you can bind to the property
> grid.
>
> For #2, in your derived classes, just throw an exception when the
> property is set with an invalid value. It will prevent the value from being
> entered.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 1. I have a MDI document what is the best way to link data form a
> > specific MDI document to parameters of a property grid. In this case I
> > have a palette that can change from document to document, and I want my
> > customized color picker to support the diffrent palettes depending on
> > what document is active.
> >
> > 2. I have a large set of bjects that use a single class in the Property
> > grid, However the classes that derive this need to ensure that certain
> > parameters remain set when ConvertFrom is called because they are
> > static values.
> >
> > - Christopher Dannemiller.
> >


 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Usercontrol property appears in property grid but not intellisense Bruce Wood Microsoft Dot NET Framework Forms 2 21st Nov 2005 05:18 PM
Finding Grid Positions in a Property Grid James CC Microsoft C# .NET 0 30th May 2005 04:22 AM
Finding Grid Positions in a Property Grid James CC Microsoft Dot NET Framework Forms 0 28th May 2005 11:44 AM
A couple of Data Grid questions =?Utf-8?B?bWtsYXBw?= Microsoft ASP .NET 4 15th Mar 2004 01:56 PM
Property Grid on a WinForm textchanged event on property input heikekrieg Microsoft Dot NET Framework Forms 0 20th Oct 2003 05:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 PM.