private void dropdownEdit1_SelectedRowChange(object sender, DropdownEdit.SelectedRowChangeEventArg e) { StringBuilder returnValue = new StringBuilder(); var table = e.SelectedRow.Table; foreach (DataColumn column in table.Columns) { returnValue.AppendFormat("{0}: {1}\r\n", column.ColumnName, e.SelectedRow[column.ColumnName].ToString()); } txtSelectedValue.Text = returnValue.ToString(); }
/// <summary> /// 触发行选择变更事件 /// </summary> /// <param name="row"></param> internal protected virtual void OnSelectedRowChanged(DataRow row) { string strText = row[DisplayMember].ToString(); AutoResetControl = true; Text = strText; SelectedRow = row; SelectedRowChangeEventArg changeEventArg = new SelectedRowChangeEventArg() { SelectedRow = row }; if (selectedRowChangeHandler != null) { selectedRowChangeHandler(this, changeEventArg); } this.ClosePopup(); }
/// <summary> /// 触发行选择变更事件 /// </summary> /// <param name="row"></param> protected internal virtual void OnSelectedRowChanged(DataRow row) { string strText = row[DisplayMember].ToString(); AutoResetControl = true; Text = strText; SelectedRow = row; SelectedRowChangeEventArg changeEventArg = new SelectedRowChangeEventArg() { SelectedRow = row }; if (selectedRowChangeHandler != null) { selectedRowChangeHandler(this, changeEventArg); } this.ClosePopup(); }