I am using UltraWinTree v9.2 (as a grid) and need to implement multi-select drop down (drop down list with checkboxes) functionality on several of the grid cells. I've this with UltraWinGrid by using another grid control embedded into the host grid cell and I was wondering if something similar can be done with the tree control. Can someone please post a code snippet or a sample project if this is something that can be done. Thanks!
PS. I've seen the following post "Using WinComboEditor as an embedded editor control in WinTree" (Feb 1, 2009 ) but the sample does not seem to work for me for whatever reason, SelectionChanged event never fires. I am using NetAdvantage v9.2
exelonbsc said:...but the sample does not seem to work for me for whatever reason, SelectionChanged event never fires
The event is not supposed to fire when you use the editor that is embedded within the UltraTree, because that event applies to user manipulation of the control itself. UltraTree exposes a CellValueChanged event, which fires when the value of a cell changes, so you should register as a listener to that event.
Another thing to note is that when using a multi-select dropdown, SelectionChanged does not correlate to a change in value, a change in the checkbox state does. The ValueList property of the UltraComboEditor returns the underlying ValueList, which is the same instance used within the tree, and the ValueList classes exposes a CheckedItems collection, which returns a collection of the items that are checked.
Brian, thanks for the information, I figured CellValueChanged was the event that I wanted to handle after I had posted this. I have another related question. My UltraComboEditor DropDownStyle=DropDownList . When user selects (checks) more than one of the items in the drop down list associated with a cell selected values show in the cell separated by a list separator (commas in this case). However, cell validation fails when new cell value gets committed ( I assume because of the DropDownStyle set to DropDownList and comma separated string isn't in the list). I could change the DropDownStyle property but I want to restrict choices to the ones I listed. I attached screenshots of the dropped down UltraComboEditor with more than one items selected and the validation error that I see when the cell selections get committed. Is there a workaround other than changing the drop down style? Thanks!