Property Grid Connection String Editor

6 posts, 0 answers
  1. Chris
    Chris avatar
    56 posts
    Member since:
    Jun 2012

    Posted 26 Jan 2012 Link to this post

    Hi,
     I have been attempting to create a custom editor for the property grid to edit connection strings. I based my custom editor on your kb article http://www.telerik.com/help/winforms/propertygrid-editors-using-custom-editor.html . The editor successfully shows the connection builder dialog and when looking at breakpoints within the BeginEdit method the EditorElement.Text value is updated. This never seems to make it back to the property grid item and therefore not back to the app.settings file used to hold the connection string. The TextChanged event never seems to fire either.

    The settings are just plain strings as the ConnectionString type cannot be user scoped. The settings are updated correctly using the standard PropertyGrid editors.

    I have created a test project to show where I have got to here is a link as I cannot post a zip file here, Test Project Link

    Many Thanks

    Chris

  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    692 posts
    Member since:
    Sep 2012

    Posted 31 Jan 2012 Link to this post

    Hi Chris,

    Thank you for writing.

    Currently, the RadPropertyGrid can only work with editors shown as dialog. Your scenario, though, is perfectly valid and I have added a feature request for this case in out Public Issue Tracking System - PITS. You can use the following link to navigate to the PITS Feature and add your vote or comment for it.

    I have also updated your Telerik points for the good suggestion.

    Should you have further questions do not hesitate to write back.

    Kind regards,
    Ivan Petrov
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

  3. DevCraft Release
  4. Chris
    Chris avatar
    56 posts
    Member since:
    Jun 2012

    Posted 31 Jan 2012 Link to this post

    Hi Ivan,
                 many thanks for your reply, it's service like this that continues to make Telerik the best in the business. As an aside for anyone who looks at the sample code I did find a very hacky workaround using a timer to pop the dialog up 5ms after the item was clicked. I then write the returned string back to the currently selected item in the property grid.

    Thanks

    Chris

  5. Nikolay
    Admin
    Nikolay avatar
    1723 posts
    Member since:
    Sep 2012

    Posted 31 Jan 2012 Link to this post

    Hi Chris,

    Thank you for your kind words.

    We are glad to hear that you managed to find an approach that works for you, until we implement the desired feature.

    Should you have any other questions, do not hesitate to contact us.

    Kind regards,
    Nikolay
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

  6. Michael
    Michael avatar
    14 posts
    Member since:
    Jun 2012

    Posted 26 Jul 2012 Link to this post

    I'm not sure what this means: "shown as dialog"? Let's say we have a display that shows a summary view, followed by an ellipse button. The button opens whatever user control is necessary to do the editing, user clicks OK or Apply and the value changes. Something like this?

    Edit: Good example here: radpropertystore-question. We'll probably do something right along these lines. It's plainly simple how to build up the editor, at any rate.

    Thanks Telerik folks!

  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    692 posts
    Member since:
    Sep 2012

    Posted 31 Jul 2012 Link to this post

    Hi Michael,

    Thank you for writing.

    By "shown as dialog" I mean a form that is shown using the ShowDialog() method rather than the Show() method. This is because if you use the Show() method the focus is moved to the form and the editor is closed.

    I hope this will be informative. Feel free to write back, should you encounter any difficulties implementing the editor you want.
     
    Greetings,
    Ivan Petrov
    the Telerik team

    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>

Back to Top
DevCraft Release