I have two cascading UltraComboEdtiors inside the AddRow template of the UltraGrid.
Depending on the selection of the first combo, I want to change the text input capability of the second combo. Sometimes they can only select from the list and other times they have to enter text because the list will be empty.
I have tried setting the column style at runtime depending on the value of the first list, but it's not affecting the second dropdown. It only works if I set it at design time (Grid_InitializeLayout). I'm trying to set it in Grid_BeforeCellListDropDown because that's where I'm detecting the selection of the first dropdown and populating the second dropdown.
Is this possible?
Update: I found that it actually allows entering text but you have to click 2-3 times in the dropdown before it lets you enter text. As for the dropdown-only mode, that still allows entering of text.
I'm setting the column style to DropDownList or Default
Hello Sam,
In order to achieve your requirement, I would recommend handling the BeforeEnterEditMode event of the grid. This will allow you to catch when your dependent combo cell is going into edit mode via the ActiveCell property of the grid. From the ActiveCell, you can also check other cells in the same row and then change the ActiveCell.Column.Style property accordingly.
I am attaching a sample project to demonstrate the above. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
UltraGridComboSwitchDemo.zip