I need a working example for swapping text after a selection has been made from a combobox in the ultragrid. I tried using a creation filter following: http://www.infragistics.com/community/forums/p/33419/182290.aspx#182290 but we have 1 in place for column merging already (http://www.infragistics.com/community/forums/t/59551.aspx).So this leaves me still trying to figure out why on earth the Cell.Text is readonly.
I tried to look at this: http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/HTML/Infragistics2.Win.v12.1~Infragistics.Win.UltraControlBase~DrawFilter.htmland: http://www.infragistics.com/community/forums/t/90661.aspx but I have no idea how to navigate through the UI Elements to find out which one my Row/Cell is so I can paint the value.
Enclosed is a code sample that I would like you to complete so I can try to implement this behavior in our product.
Also, how would I use a DrawFilter in a class that would use Cell Value to grab the text to paint? This might be self explanatory after seeing what you guys do.
Also, side question: Why on earth does the DrawFilter and CreationFilter fire on mouse move in the grid?
Mike / Sahaja,
That works. The only reason we used a ValueList was because we were using 2 different types of objects and passing in each object as the DataValue parameter. This was done so we could pull the rest of the properties from the object after a selection was made.
I do appreciate the explanation on the DrawFilter. having never implemented one I wouldn't know the drawbacks.
Hi Glenn,
You can use UltraDropDown or UltraCombo instead of a ValueList. And you don't need ADO.Net. You can populate the list using an UltraDataSource.
A DrawFilter/CreationFilter is not a good solution here, because while you could change the displayed text in the ValueList, you would only be changing it at the rendering level. This means that the size of the ValueList would not know about the displayed text and it would end up clipped or with too much space, depending on whether you made the text longer or shorter.
I realize that you responded to my issue with 3 columns, but when looking through the example there's a caveat; we are using a ValueList for the items and not a DataTable. We do not use ADO.Net on the UI. The reason for using a ValueList is because we use 2 different types of objects in the same list. Example: Apples and Oranges. Both are fruit but the properties are different.
How would I use a ValueList in your example?
I really do wish you would have just given me the drawfilter I asked for so I didn't have to lose over a week in development.
Glenn
Hello Glenn,
I modified the previous sample to demonstrate how three columns can be added to UltraCombo dropdown. Two columns, Value member (PostalCode column) and Display member (Abbreviation column that is shown in the editor portion of control) being hidden and showing only Country name column in the drop down.
Please review it and let me know if you have any questions.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
This won't work. Unless you can have 3 columns in the drop down, 2 hidden, pass back the desired text and Id, but display different text in the drop down. This is why I want to use a drawfilter.