BrightIdeasSoftware.ObjectListView.GetCellEditor C# (CSharp) Method

GetCellEditor() protected method

Return a control that can be used to edit the value of the given cell.
protected GetCellEditor ( OLVListItem item, int subItemIndex ) : Control
item OLVListItem The row to be edited
subItemIndex int The index of the cell to be edited
return Control
        protected virtual Control GetCellEditor(OLVListItem item, int subItemIndex)
        {
            OLVColumn column = this.GetColumn(subItemIndex);
            Object value = column.GetValue(item.RowObject) ?? this.GetFirstNonNullValue(column);

            // TODO: What do we do if value is still null here?

            // Ask the registry for an instance of the appropriate editor.
            Control editor = ObjectListView.EditorRegistry.GetEditor(item.RowObject, column, value);

            // Use a default editor if the registry can't create one for us.
            if (editor == null)
                editor = this.MakeDefaultCellEditor(column);

            return editor;
        }
ObjectListView