473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A Couple of questions about the Property Grid

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.

Jun 17 '06 #1
2 1591
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]
- mv*@spam.guard.caspershouse.com

<ch***************@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
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.

Jun 18 '06 #2
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]
- mv*@spam.guard.caspershouse.com

<ch***************@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
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.


Jun 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dln | last post by:
Howdy. I'm a bit new to C# and got a couple of quick questions that perhaps someone can help me answer. First, is there a property that you set on a TextBox control that will force the control to...
2
by: Dave | last post by:
I am converting an ASP Classic web site to an ASP.NET application and have some real basic formatting or design questions. (The classic ASP site has both code (forms) and content pages.) 1.When...
0
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control...
4
by: Ed Bick | last post by:
I know how to do this stuff so easily in VB6......... 3 questions. I have loaded a grid by binding it to a dataset. All is well with that. 1) How do I retrieve the value of a column when a...
5
by: EdB | last post by:
1) How do I make the contents of a Windows datagrid editable while at the same time preventing new rows from being added? 2) How do I align the contents of a column align-right, but the header of...
3
by: melton9 | last post by:
I'm just getting into using datagrid and have a couple of questions. 1.)How do you get the grid to show the values of a datatable automatically? Currently I have to hit the + sign and then...
7
by: Don | last post by:
I'm not very proficient with Access, probably only enough to make me dangerous. With that said I've got two questions. #1 (probably pretty simple). I know I've done this before but how do I get...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
10
by: Derek Hart | last post by:
I can set focus to my property grid by using propgrid.Focus - but how can I set the default property that is always first? Or just set focus to the default property? Can this be done?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.