📅  最后修改于: 2022-03-11 14:49:17.282000             🧑  作者: Mango
// add check box only for Node == TimeTable and column == isLeapYear
private RepositoryItemCheckEdit repositoryItemCheck = new RepositoryItemCheckEdit();
private void TreeList_CustomNodeCellEdit(object sender, GetCustomNodeCellEditEventArgs e)
{
if (e.Node.Tag is TimeTable timeTable && e.Column.FieldName == isLeapYear) e.RepositoryItem = repositoryItemCheck;
}
// add check box for all nodes in column
UcView.TreeList.RepositoryItems.Add(repositoryItemCheck);
colIsLeapYear.ColumnEdit = repositoryItemCheck;