📌  相关文章
📜  如何在 c# 代码示例中将复选框添加到 devexpress 树列表中的列

📅  最后修改于: 2022-03-11 14:49:17.282000             🧑  作者: Mango

代码示例1
// 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;