//TO MAP to groups above public static ctrl_TableList setWidthToContent(this ctrl_TableList tableList) { tableList.makeColumnWidthMatchCellWidth(); tableList.Resize += (e, s) => { tableList.makeColumnWidthMatchCellWidth(); }; tableList.getListViewControl().ColumnClick += (e, s) => { tableList.makeColumnWidthMatchCellWidth(); }; return(tableList); }
public static ctrl_TableList show(this ctrl_TableList tableList, object targetObject) { if (tableList.notNull() && targetObject.notNull()) { tableList.clearTable(); tableList.title("{0}".format(targetObject.typeFullName())); tableList.add_Columns("name", "value"); foreach (var property in PublicDI.reflection.getProperties(targetObject)) { tableList.add_Row(property.Name, targetObject.prop(property.Name).str()); } tableList.makeColumnWidthMatchCellWidth(); } return(tableList); }