2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Handle the dates as stringsWhen the date is set as a string format, it sorts the records based on the string and does not sort the record correctly in the Date string. So, use the dataset and apply the format property in the PivotItem class. C# //Sets date time column. dt.Columns.Add("Date", GetType(DateTime)) //Sets Date Time format to the Pivot Row. this.pivotGridControl1.PivotRows.Add(New PivotItem With {.FieldMappingName = "Date", .Format="MM/dd/yyyy", .TotalHeader = "Total"}) VB ‘Sets date time column dt.Columns.Add("Date", GetType(DateTime)) ‘Sets Date Time format to the Pivot Row. Me.pivotGridControl1.PivotRows.Add(New PivotItem With {.FieldMappingName = "Date", .Format="MM/dd/yyyy", .TotalHeader = "Total"})
The following screenshots display the date strings before formatting and after formatting: Figure 1: Before formatting Figure 2: After formatting Samples: |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.