473,388 Members | 1,198 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,388 software developers and data experts.

how to allow edit property in PropertyGrid with only Set method

Hi!
Within my class (say class A) I have read-only property returning reference
to object of type B (since I do not want other to assign another reference
to this property).
I have created a TypeConverter for class B and I want to allow users to
edit properties exposed by object B. And with subproperties its works fine,
but property within object A is still "grayed", so User cannot write string
value in this field. My GetCreateInstanceSupported() returs false, since I
do not want to create any new instance (thats why my B b {get;} has only Get
method), but I still want to allow users to edit properties of this object.
How to accomplish this functionality?

Thanks for any help!

GRTX,

Paul

<code>

public class A

{

B _b = new B();

public B b

{

get {return _b;} // Read Only, but I want users to edit _b properties
within PropertyGrid using TypeConverter

}

}

[TypeConverter(BTypeConverter)]

public class B

{

public int SomeProperty {get;set;}

}

</code>


Nov 16 '05 #1
0 1477

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

Similar topics

7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
5
by: Ger | last post by:
The propertygrid is a great control, but I would like to show a more descriptive text for the properties in the control. I tried to find a solution within the system.componentmodel but did not...
1
by: Carl Gilbert | last post by:
Hi Is there any way to enable/disable an item in a property grid at runtime? I have two properties that I am showin in a property gris and based on the validity of the first property, I want...
1
by: Steve Teeples | last post by:
Using VS2005, is the a simple method to hide or show a property within a propertygrid based upon the changing value of another property within the propertygrid. For example, if I change a...
4
by: John Allen | last post by:
Hi there, Does anyone know if the standard "PropertyGrid" control is (foreign) language sensitive. If I display an object in the control, and my object has the native .NET "Size" struct as a...
3
by: jarnie | last post by:
I am attempting to make a form which has alpha transparency that varies across the form, similar to the Adobe splash screens and launchy: http://www.launchy.net/images/screenshot_sheep.jpg ...
3
by: julia_beresford | last post by:
Hi I have a main class with a public property of type sub class, which has several properties of type int. When i assign an instance of my main class to propertyGrid.SelectedObject I cannot...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.