Display default value of field in treeview

This commit is contained in:
Michael Becker 2019-11-20 00:15:28 -05:00
parent 32b7acac89
commit 8c0a110000
No known key found for this signature in database
GPG Key ID: 389DFF5D73781A12

View File

@ -78,7 +78,7 @@ namespace UniversalEditor.Editors.Database
foreach (DatabaseField field in table.Fields)
{
TreeModelRow rowColumn = new TreeModelRow();
rowColumn.RowColumns.Add(new TreeModelRowColumn(tmDatabase.Columns[0], String.Format("{0} ({1})", field.Name, field.Value == null ? String.Empty : field.Value.GetType().Name)));
rowColumn.RowColumns.Add(new TreeModelRowColumn(tmDatabase.Columns[0], String.Format("{0} ({1}, default {2})", field.Name, field.Value == null ? (field.DataType != null ? field.DataType.Name : String.Empty) : field.Value.GetType().Name, field.Value == null ? "NULL" : field.Value.ToString())));
rowColumns.Rows.Add(rowColumn);
}
rowTable.Rows.Add(rowColumns);