public EGUIGridView(GridViewModel model, string[] columnTitles) { ViewState = new TreeViewState(); ViewModel = model; ViewHeader = new GridViewHeader(columnTitles); treeView = new GridTreeView(ViewState, ViewHeader.GetTreeViewHeader(), ViewModel) { OnDrawColumnItem = OnDrawColumnItem, OnGetRowHeight = GetRowHeight, OnItemContextClicked = OnItemContextClicked, OnItemDoubleClicked = OnItemDoubleClicked, }; treeView.Reload(); treeView.multiColumnHeader.ResizeToFit(); }
public EGUIGridView(GridViewModel model, GridViewHeader header) { ViewState = new TreeViewState(); ViewModel = model; ViewHeader = header; treeView = new GridTreeView(ViewState, header.GetTreeViewHeader(), ViewModel) { OnDrawColumnItem = OnDrawColumnItem, OnGetRowHeight = GetRowHeight, OnItemContextClicked = OnItemContextClicked, OnItemDoubleClicked = OnItemDoubleClicked, OnItemSelectedChanged = OnItemSelectedChanged, IsMultiSelect = false, }; treeView.Reload(); treeView.multiColumnHeader.ResizeToFit(); }