I think i wasnt quite clear the last time . Maybe i need to rephrase my
problem.
The one in the codeproject is the same what i am doing . I just checked it .
It also has
propertyGrid1.SelectedObject = textBox1;
Instead of testBox1 i have my object called "first".
This object has certain properties like A,B & C.
I can see it and i can change it in the property grid.
But I need to SAVE it .Thats inside the object "first".
Inorder to do that im able to get the name of the property what the
user selects i.e., A or B or C. using SelectedGridItem.
--
deepak
"TOM" wrote:
> Check The Code Project. They've had several good C# articles using the
> Property Grid.
>
> http://www.codeproject.com search for propertygrid in articles
>
> A specific one that may be helpful:
>
> http://www.codeproject.com/csharp/PropertyGrid.asp
>
> I'm not sure of the syntax in C#, but in C++ you label the properties with
> the
> [ attributes ] descriptions.
>
> -- Tom
>
>
>
>
>
>
> "Deepak" <> wrote in message
> news:0A7A9090-FE70-401D-BAD9-...
> > Im new to PropertyGrid .
> > I dont know how to set the property of the object that is changed in the
> > property grid . All that my form has relative to propertygrid is :
> >
> > propertygrid.SelectedObject=first; //object
> >
> > private void propertygrid_PropertyValueChanged(object s,
> > System.Windows.Forms.PropertyValueChangedEventArgs e)
> > {
> > MessageBox.Show( propertygrid.SelectedGridItem.ToString());
> > /*My intension is first.
> > propertygrid.SelectedGridItem.ToString()=propertyg rid.SelectedGridItem.ToString());*/
> > /*I know "first" is an object and this is not possible directly . */
> > }
> >
> >
> > If i can get a simple code to do this at this moment it would be very
> > useful.
> > Thanks in advance .
> > --
> > deepak
>
>
>