Hi guys.
I need to set a dxDataGrid Summary programmatically but haven’t quite found out how. When doing it in the Options Property Editor, it works fine.
This is what I set in the Editor and it works:
"summary": {
"totalItems": [{
"column": "myColumn",
"summaryType": "count"
}],
"groupItems": [{
"column": "myColumn",
"summaryType": "count"
}]
},
But then, I need to set it at run time, and this is what I have tried and it doesn’t work:
this.dxDataGrid1.Options.summary = new
{
totalItems = new object[] {
new
{
column = "myColumn",
summaryType = "count"
}
},
groupItems = new object[] {
new
{
column = "myColumn",
summaryType = "count"
}
}
};
Any tips on what else I could try?
Thanks in advance.
Ivan
(Wisej 2.2.52.0 – VS 2019 – C#)
Never mind, got it working. It was just that the timing was wrong.
By the way, the coding I was using was right.
Please login first to submit.