private void EditFormatFieldProps() { if (this.dvFileFields.Count < 1) { return; } BindingManagerBase bm = this.BindingContext[dvFileFields]; DataRow row = ((DataRowView)bm.Current).Row; FormatFieldPropsEdit FormatFieldPropsEditForm = new FormatFieldPropsEdit(row, true); if (FormatFieldPropsEditForm.ShowDialog() == DialogResult.OK) { for (int counter = 0; counter < row.ItemArray.Length; counter++) { if (!row.Table.Columns[counter].ReadOnly) { row[counter] = FormatFieldPropsEditForm.FieldProperties[counter]; } } cl.EditField(this.strSettingsName, this.dataGrid2.CurrentRowIndex, FormatFieldPropsEditForm.FieldProperties["header"].ToString(), FormatFieldPropsEditForm.FieldProperties["type"].ToString(), FormatFieldPropsEditForm.FieldProperties["delimiter"].ToString(), System.Convert.ToInt32(FormatFieldPropsEditForm.FieldProperties["length"]), System.Convert.ToInt32(FormatFieldPropsEditForm.FieldProperties["align"]), FormatFieldPropsEditForm.FieldProperties["filler"].ToString(), FormatFieldPropsEditForm.FieldProperties["name"].ToString()); } }