作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
最佳答案
the text in the header should be a time which is summed up in the group.
没问题:)
olv.AboutToCreateGroups += delegate(object sender, CreateGroupsEventArgs args) {
foreach (OLVGroup olvGroup in args.Groups) {
int totalTime = 0;
foreach (OLVListItem item in olvGroup.Items) {
// change this block accordingly
MyRowObjectType rowObject = item.RowObject as MyRowObjectType;
totalTime += rowObject.MyNumericProperty;
// change this block accordingly
}
olvGroup.Header += String.Format(" (Total time = {0})", totalTime);
}
};
关于c# - objectlistview 如何更改组标题中的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32779907/
我是一名优秀的程序员,十分优秀!