UltraGrid / User control

Posted by Freddy Boisseau on 03-Feb-2009 14:01

Is is possible to have a cell in an UltraGrid use an user control to handle the data entry? I would like to do some editing in an UltraGrid, but some of the fields are linked to supporting tables. Because of this I would like to use a combo box that has been created for a table for input in that field.

All Replies

Posted by Admin on 04-Feb-2009 12:23

It is possible using an ABL inherited control (inheriting from the UltraComboEditor for instance). Add a bindingSource / query inside the inherited Control and open the query.

The bindingSource is attached to the ultraComboEditor using the property sheet, the query is opened in the constructor.

See attached sample - files go to samples/UltraGid2 (sorry for the typo).

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/SalesRepComboEditor.cls:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/SalesRepComboEditor.resx:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/UltraGridForm.cls:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/UltraGridForm.resx:550:0]

Posted by Freddy Boisseau on 05-Feb-2009 15:16

Mike,

Thank you for your help. Based on the code you include I realized that I had not built my combo boxes, that include a binding source, in the best manner. I had used the "Progress.Windows.UserControl" to which I added an "Infragistics.Win.UltraWinGrid.UltraCombo" and a "Progress.Data.BindingSource". I have been experimenting with this and have not been able to get it work. I got real close, but was getting error message that the "DisplayLayout" was not defined when I tried to add it to a form. Do you know if there is any example using the "Infragistics.Win.UltraWinGrid.UltraCombo"?

Thank you

Freddy

Posted by Freddy Boisseau on 06-Feb-2009 11:22

I finally figure out what I need to do. Instead of pointing the cell's editor control to the "Progress.Windows.UserControl" that I created, I needed to point the cell's editor control to the combo box in the the user control. Now that I have worked this out, I have new issue. Two of the cells point to the state and county table. Thus if I change the state the the list of valid counties need to change. What is happening is that when each row is loaded the state changes, and the list of counties change which is fine, except that changing the county effects the display of the preceding row. How do I tell the ultraGrid that once the "TEXT" property is set in the cell, by the editor control, it should only change that property if the "VALUE" property changes?

This thread is closed