I want to change the name of the group header but i cant find any solutions in the documentation or on google.
the text in the header should be a time which is summed up in the group.
this is how it should look like:
the text in the header should be a time which is summed up in the group.
No problem :)
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);
}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With