public override void ExtractValuesFromCell(System.Collections.Specialized.IOrderedDictionary dictionary, DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly) { if (String.IsNullOrEmpty(this.DataField)) { return; } if (cell == null || dictionary == null) { return; } Object value = null; if (cell.Controls.Count > 0) { ISelectorFieldControl selector = cell.Controls[0] as ISelectorFieldControl; if (selector != null) { value = selector.Selected; } } if (value != null) { if (dictionary.Contains(this.DataField)) { dictionary[this.DataField] = value; } else { dictionary.Add(this.DataField, value); } } }
public override void ExtractValuesFromCell(System.Collections.Specialized.IOrderedDictionary dictionary, DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly) { Object value = null; if (cell == null || dictionary == null) { return; } if (cell.Controls.Count > 0) { Int32 indexOfEditorList = (cell.Controls.Count == 2) ? 0 : 1; ListControl valueList = cell.Controls[indexOfEditorList] as ListControl; if (valueList != null) { value = valueList.SelectedValue; } } if (value != null || this.AllowNulls) { if (dictionary.Contains(this.DataField)) { dictionary[this.DataField] = value; } else { dictionary.Add(this.DataField, value); } } }