Click here to Skip to main content
15,911,890 members
Home / Discussions / C#
   

C#

 
AnswerRe: Excel Export Pin
KaptinKrunch19-Dec-05 18:13
KaptinKrunch19-Dec-05 18:13 
GeneralRe: Excel Export Pin
Mahi.Ragava19-Dec-05 18:24
Mahi.Ragava19-Dec-05 18:24 
GeneralRe: Excel Export Pin
Mahi.Ragava19-Dec-05 18:48
Mahi.Ragava19-Dec-05 18:48 
GeneralRe: Excel Export Pin
KaptinKrunch20-Dec-05 3:51
KaptinKrunch20-Dec-05 3:51 
AnswerRe: Excel Export Pin
narendrakumarp20-Dec-05 0:44
narendrakumarp20-Dec-05 0:44 
GeneralRe: Excel Export Pin
Mahi.Ragava20-Dec-05 17:22
Mahi.Ragava20-Dec-05 17:22 
QuestionHow to keep the popup open on click of another popup. Pin
Bipin Varankar19-Dec-05 17:58
Bipin Varankar19-Dec-05 17:58 
QuestionPropertyGrid : Remove properties at runtime Pin
ZejulioZ19-Dec-05 16:20
ZejulioZ19-Dec-05 16:20 
Hi,

I've some issues using property grid features, more specifically removing properties from the propertyGrid's selected object.

I want to edit the properties of the class at runtime, and dynamically remove some of them depending on some criteria. The attribute [Browsable(false)] does
not do what I need since it does not allow me to dynamically select what to remove, and invoking Properties.Remove in the component.PreFilterProperties method
is more what I'm looking for.

Unfortunately, and contrary to all the msdn's articles I've read on the subject, what I'm doing is not working as expected.

Here is a snippet to illustrate my point :

--------------------------------

entity = new Entity();<br />
entity.MyValue = "Hello world !";<br />
propertyGrid1.SelectedObject = entity;<br />
<br />
[Designer(typeof(Entity.EntityDesigner))]<br />
public class Entity : Component<br />
{<br />
	public Entity()<br />
	{<br />
	}<br />
<br />
	private string myValue;<br />
	public  string MyValue<br />
	{<br />
		set { myValue = value; }<br />
		get { return myValue; }<br />
	}<br />
<br />
	public class EntityDesigner : Component<br />
	{<br />
		public EntityDesigner()<br />
		{<br />
		}<br />
<br />
		protected override void PreFilterProperties( IDictionary Properties )<br />
		{<br />
			base.PreFilterProperties( Properties );<br />
			Properties.Remove("MyValue");<br />
		}<br />
	}<br />
}


--------------------------------

The 'entity' class is never instantiated, and I suspect this is because it will only be done at design-time and not runtime,
could you confirm this ? Or am I missing something else ?

Thanks for the help,

Julien
AnswerRe: PropertyGrid : Remove properties at runtime Pin
MyNothing19-Dec-05 16:50
MyNothing19-Dec-05 16:50 
GeneralRe: PropertyGrid : Remove properties at runtime Pin
ZejulioZ19-Dec-05 17:04
ZejulioZ19-Dec-05 17:04 
QuestionHow to unload image in a PictureBox control Pin
t800t819-Dec-05 15:15
t800t819-Dec-05 15:15 
AnswerRe: How to unload image in a PictureBox control Pin
MyNothing19-Dec-05 15:53
MyNothing19-Dec-05 15:53 
GeneralRe: How to unload image in a PictureBox control Pin
t800t819-Dec-05 16:00
t800t819-Dec-05 16:00 
QuestionHang Time Pin
tatchung19-Dec-05 15:14
tatchung19-Dec-05 15:14 
AnswerRe: Hang Time Pin
tatchung19-Dec-05 15:38
tatchung19-Dec-05 15:38 
Questionhow i can hide command prompt in C# console application? Pin
Developer_119-Dec-05 14:01
Developer_119-Dec-05 14:01 
AnswerRe: how i can hide command prompt in C# console application? Pin
Dave Kreskowiak19-Dec-05 14:38
mveDave Kreskowiak19-Dec-05 14:38 
JokeRe: how i can hide command prompt in C# console application? Pin
Luis Alonso Ramos19-Dec-05 15:38
Luis Alonso Ramos19-Dec-05 15:38 
QuestionContextMenuHandler Pin
Brad Benham19-Dec-05 13:04
Brad Benham19-Dec-05 13:04 
QuestionDoc to Txt ? Pin
Kain3419-Dec-05 13:03
Kain3419-Dec-05 13:03 
AnswerRe: Doc to Txt ? Pin
Kain3420-Dec-05 6:57
Kain3420-Dec-05 6:57 
QuestionBindingSource.Filter Pin
ricny04619-Dec-05 12:37
ricny04619-Dec-05 12:37 
AnswerRe: BindingSource.Filter Pin
ricny04619-Dec-05 12:53
ricny04619-Dec-05 12:53 
Questionframework 2.0 and visual studio 2003: compatible? Pin
Sled Dog19-Dec-05 12:17
Sled Dog19-Dec-05 12:17 
AnswerRe: framework 2.0 and visual studio 2003: compatible? Pin
Dave Kreskowiak19-Dec-05 14:34
mveDave Kreskowiak19-Dec-05 14:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.