CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2008
    Posts
    24

    Pass value from editor to propertygrid at design time

    Hi everyone,
    i have designed an editor which i use it to get some string values from the user at design time and i want to pass these string values as a collection into the propertygrid and then save it in the form's initializecomponent method. I can manage that just by adding the values into the propertygrid. Does anybody know how to do this via the editor?
    Any help would be appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Pass value from editor to propertygrid at design time

    can you zip your project and show what you already have so far, so we better can see what your problem is. Because the user input in a textbox for example normally triggers a textChanged or in the end a Validate delegate and you cn use them for sending your strings wherever you want to have them
    Last edited by JonnyPoet; September 25th, 2008 at 06:10 AM.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  3. #3
    Join Date
    Mar 2008
    Posts
    24

    Re: Pass value from editor to propertygrid at design time

    Quote Originally Posted by JonnyPoet
    can you zip your project and show what you already have so far, so we better can see what your problem is. Because the user input in a textbox for example normally triggers a textChanged or in the end a Validate delegate and you cn use them for sending your strings wherever you want to have them
    Thanks for the reply JonnyPoet. I have a component and I created a collection editor which holds a list. I show the collection in the propertygrid of the component and i can add/remove values by using the propertygrid. What i need here is to be able to insert the values into the collection via my editor form at design time. When i reopen the propertygrid collectioneditor i want to see the values i inserted.

  4. #4
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Pass value from editor to propertygrid at design time

    Quote Originally Posted by izzetbaysal
    Thanks for the reply JonnyPoet. I have a component and I created a collection editor which holds a list. I show the collection in the propertygrid of the component and i can add/remove values by using the propertygrid. What i need here is to be able to insert the values into the collection via my editor form at design time. When i reopen the propertygrid collectioneditor i want to see the values i inserted.
    Is the editor form part of your component just like we have editor forms that opens when clicking to e.g. 'Columns...' in a datagridview? Or in which way are you inserting the collection into your property grid ?
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  5. #5
    Join Date
    Mar 2008
    Posts
    24

    Re: Pass value from editor to propertygrid at design time

    Quote Originally Posted by JonnyPoet
    Is the editor form part of your component just like we have editor forms that opens when clicking to e.g. 'Columns...' in a datagridview? Or in which way are you inserting the collection into your property grid ?
    Thanks for the reply again Jonny. Yes, editor form is part of my component and i also use a custom CollectionEditor to insert values. By using the custom CollectionEditor everything is fine, data is serialized into the form designer and works well, but i also want to be able to do that over my editor form at design time.

  6. #6
    Join Date
    Mar 2008
    Posts
    24

    Re: Pass value from editor to propertygrid at design time

    Quote Originally Posted by JonnyPoet
    Is the editor form part of your component just like we have editor forms that opens when clicking to e.g. 'Columns...' in a datagridview? Or in which way are you inserting the collection into your property grid ?
    Thanks for the reply again Jonny. Yes, editor form is part of my component and i also use a custom CollectionEditor to insert values. By using the custom CollectionEditor everything is fine, data is serialized into the form designer and works well, but i also want to be able to do that over my editor form at design time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured