This is a migrated thread and some comments may be shown as answers.

Property Grid Connection String Editor

5 Answers 215 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 2
Chris asked on 26 Jan 2012, 05:52 PM
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

5 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 31 Jan 2012, 09:44 AM
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).

0
Chris
Top achievements
Rank 2
answered on 31 Jan 2012, 02:09 PM
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
0
Nikolay
Telerik team
answered on 31 Jan 2012, 02:27 PM
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).

0
Michael
Top achievements
Rank 1
answered on 26 Jul 2012, 09:38 PM
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!
0
Ivan Petrov
Telerik team
answered on 31 Jul 2012, 12:06 PM
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 >>
Tags
PropertyGrid
Asked by
Chris
Top achievements
Rank 2
Answers by
Ivan Petrov
Telerik team
Chris
Top achievements
Rank 2
Nikolay
Telerik team
Michael
Top achievements
Rank 1
Share this question
or