I set up a small UltraGrid with 2 bounded and 2 unbounded columns. Whenever the user clicks on a row in den Grid, I want to create a UltraCombo in the cells of the unbounded columns for the selected row. The values of the UltraCombo are based on the value of the unbounded columns, which should be replace with the Combos. I found some samples setting up UltraCombos for all cells of a column, but I got no way to create the UltraCombo at runtime and place it into one single cell.
I tried to create the UltraCombos within the AfterSelectChange-Event and remove them within the BeforeSelectChange-Event.
Could you please give me a small example of adding a UltraCombo to one specific cell.
Thanks in advance!
That's the hard way.
You do not have to use an Editor for this. You can simply assign the ValueList to the ValueList property of the column. You could also use an UltraDropDown control in place of the ValueList - but once again, you would simply assign it to the ValueList property. Using an editor here is a whole lot of extra code for no reason. :)
Hi,
Try something like this:
valueList.ValueListItems.Add((char)'Y', "Yes");
editorSettings.ValueList = valueList;
Infragistics.Win.EditorWithCombo editor = new Infragistics.Win.EditorWithCombo(new DefaultEditorOwner(editorSettings));
mainGrid.DisplayLayout.Bands[0].Columns["Visible"].Editor = editor;
This will create editor with combo and embed it to appropriate column cells.
Hope it helps.
Cheers.