Saving Modifications...

3 posts, 1 answers
  1. Joel
    Joel avatar
    3 posts
    Member since:
    Nov 2006

    Posted 15 Mar 2012 Link to this post

    Hi Dear Telerik :)

    Maybe this is a dumb question....

    In the First Look example when you use a button... is there any way to save this modifications and stored as xml or database field or something and then load this later to affect the behavior of the button maybe in the onLoad event of the main form ?

    Also, it's possible to use the PropertyGrid with objects of a parent form? I mean, clicking a button and property grid loaded in a child form affecting properties of some control of the parent form?

    And with that ... is there a way to assign controls programmatically to the propertygrid?

    Thanx in advance!

  2. Answer
    Ivan Petrov
    Ivan Petrov avatar
    717 posts

    Posted 16 Mar 2012 Link to this post

    Hello Mario,

    Thank you for writing.

    Directly to your questions.
    1. There is no built-in functionality to export all settings from the RadPropertyGrid. You will have to implement it on your own. This should not be very difficult as you have access to all the PropertyGridItems, which represent properties of the edited object through the RadPropertyGrid.Items property. You can iterate and save all values to an xml for example. Then you can restore them by reading them form the saved xml and setting then through the same items collection.

    2. There is no problem to set an object form a parent, child or any other form to the RadPropertyGrid. You just have to do it through code and not through the designer.

    3. To set an object as selected for the RadPropertyGrid using code, you should use the SelectedObject property. You an also set a collection of objects as selected using the SelectedObjects property.

    I hope this will be useful for you. Should you have further questions, I would be glad to help.

    Kind regards,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. Abdul
    Abdul avatar
    27 posts
    Member since:
    Jan 2017

    Posted 13 Nov 2017 Link to this post

    Hi Ivan Petrov,

            I have  a RadForm,in which many RadControls are there (RadTextBox,RadDropDownList,RadMultiColumnComboBox,RadGridView,RadButon,RadDateTimePicker,RadToggleSwitch,RadCheckBox,RadRadioButton,etc).When I closing the Form I need to save all values in controls into an XML file instead of DataBase.Then Load it from XML to controls.How can i handle this?

    I hope you got my requirement.

    If any clarification,please let me know?





Back to Top