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
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.
Hello Melko,
thank you for your answer. It will take me some time to check and verify. I will answer as soon as possible.
Yes, you are absolutely correct.
You need to create your own class with public property for each value you may change. Then you need to pass cell data to and from this class. And yes, you will not need unbound column in this case.
Please let me know if you need any further assistance with this matter.
Hello Milko,
Yes and no. I have studied the example without testing it in my context. If I am right, I found out, that is possible with unbound columns. So I have to handle data myself by copying from datarow(view) to object and back myself, haven't I?
Did you have time to check the sample?
Please feel free to let me know if you still have any questions on this matter.