Hi, We have a UltraGridColumn which is a dropdownlist. We want to select one of the values from it and copy to somewhere else, but disable editing. How to do that ? Here is our setting:
UltraGridColumn MyColumn;
MyColumn.style = ColumnStyle.DropDown;
MyColumn.CellActivation = Activation.NoEdit;
Note that even if we set CellActivation to NoEdit, it's still editable. And we tried changing the Style to DropDownList, then it's not editable, but then the user cannot select the cell and copy the value. Can anyone help ?
So you need the user to be able to select text in the cell so they can copy from it, but you want to prevent them from typing into the cell or picking an item from the list?
Why have a list if the user can't choose an item from it? That's a very non-standard UI for Windows and it's pretty much guaranteed to confuse your users, I think.
Yes, I want to prevent typing, but I also want to allow copy the value in the cell and paste to somewhere. Now if I select some value from dropdown list and hit ctrl+C, there's nothing in the clipboard.
What exactly do you mean by "disable editing"? Do you want to prevent typing into the cell? if so, just set the style to DropDownList and don't change the cell activation. If you want to prevent changing the selected value of the cell, handle the BeforeCellUpdate event and set e.Cancel = true, and you can see the value the user wanted to select in e.NewValue.