Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
UltraControlContainerEditor and UserControl with more than one property
posted

Hi,

I have good success with UltraControlContainerEditor (Infragistics v14.2), to embed usercontrols in grids. I wonder, if it is possible, to embed a usercontrol with more than one property in a grid cell. I found only one RenderingControlPropertyName and one EditingControlPropertyName.

In the usercontrol there are about 5 combos and textboxes like a tiny form. It is used for postal addresses including verification functions and function buttons. To use that usercontrol would be a good way, because the layout and function is used very often all over the application.

Regards, Olaf

Parents
No Data
Reply
  • 21795
    Offline posted

    Hello Olaf,

    Yes, you can use more complex user control as editing and rendering control. What you need to do is create your own class with properties covering all the fields in your user control. This class should implement INotifyPropertyChanged interface. In your user control add a property of the same type as your class is and handle PropertyChanged event. For control container editor set RenderingControl and EditingControl to refer your user control and RenderingControlPropertyName and EditingControlPropertyName to refer to the property you added in your user control for your custom class.

    There is a nice sample implementing very similar scenario to what you are trying to achieve in our samples browser. To find this sample run sample browser (it should be installed by default); click on Legacy Samples link at the lower right corner; navigate to Commands and Editors section -> WinEditors and click on ControlContainerEditor and then on Launch button; in Control Container Editor window start Same EditingControl and RenderingControl sample.

    You can also check the code behind this sample by clicking on Open C#/VB Solution button.

    Please check this sample and let me know if you have any additional questions.

Children