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?
Hello Glenn,
If you are trying to swap text with any values then using a dropdown list is recommended solution. By placing a dropdown list user can select between options and it can also act as a look up table to convert ID values into more user friendly text. Dropdown list also limits user to specific set of choices without permitting him to enter invalid values. You can refer to the below KB article to read more about this:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7841
Using Infragistics UIElementViewer utility you can identify the corresponding UIElement for a Row/Cell. You can read about the UIElementViewer utility here:
http://geekswithblogs.net/devin/archive/2005/11/17/60406.aspx
I’m attaching the UIElementViewerUtility to this post as the download link at above site does not work and we are working on it.
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
I think you miss understand me; I'm wanting to change what's rendered back from the dropdownlist (combobox). The text won't be the same from what's in the dropdownlist. In following this article: http://www.infragistics.com/community/forums/p/33419/182290.aspx#182290 it suggests it can be done. I'd like to know how.
What I want to do is combine a prefix to the text brought back. The sample I included was just to help figure out how. In the article I linked it mentioned using a DrawFilter or CreationFilter; we already have a CreationFilter assigned to the grid so that leaves a DrawFilter. Sadly, I cannot locate a code example anywhere in your help or forums that illustrates using one in the detail I need.
FYI the link on the website you sent me to doesn't work.
Glenn
There is a possibility of displaying corresponding text for a value in an UltraCombo by setting its ValueMember and DisplayMember properties. I recommend using a UltraCombo control in the Grid column instead of writing a DrawFilter for achieveing this. Please refer to the attached sample which demonstrates this approach and let me know if I may be of further assistance.
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.
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.