Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
UltraGrid with UltraComboEditor doesn't honor LimitToList
posted

v11.1

I have a grid which has a column where each row can have a different editor.  When a row is added the editor for that row is created and set on the cell.

The editor for any given row/cell of this column could be any of these: CheckEditor, ColorPickerEditor, DateTimeEditor, FontNameEditor, UltraComboEditor

Since the cells of the column are not a consistent type, I think it is problematic to use column.Style = ColumnStyle.DropDownList;.

I think I am going to have to handle NotInList myself in the AfterCellUpdate event.

Am I thinking correctly about this?

  • 469350
    Verified Answer
    Offline posted

    Hi Kipp, 

    Well.. there are going to be a number of problems getting a column to work with such a wide variety of editors. The first one is what data type to use for the column - since the DataType is applied to the column and not the cell. Presumably you would use Object, but most of these editors will not work with an object natively, so you will probably need  a bunch of DataFilters to handle that. 

    Assuming you have already passed that hurdle, then the cell Style should be fairly simple to deal with. I would think that setting the Style on the column would, in fact, work. The editor applied to the Cell will override the actual Style in some ways, but the cell should still pick up the DropDownList style from the column.

    It's not clear from your post whether you want some cells to be DropDownList and others to allow typing (DropDown style). But if that is the case, or if I am wrong about the Style property on the column working how you want it, then there is a very simple solution - set the Style property on the Cell, not the column.