I have a Pivot Grid, that has a data set that has two fields, In those fields, it's possible that records in that collection could have empty string value. And if I set one field to be my column group and the other to be my row group and one of those fields as my aggregate count field, everything looks fine, and as expected.
However, as soon as I filter the ROW GROUP other than the EMPTY value, it drops the COLUMN groups "EMPTY" string column, as well, as if I filter the COLUMN GROUP on a non-empty value, it removes the ROW GROUP's empty string row. I am not sure if this is by design or what but, this is causing an issue for our customers as they cannot figure out why their numbers in this pivot grid are not the same in other reports (non-pivot). NOTE, if I filter in either the GROUP or COLUMN fields for the "EMPTY" string value, all the EMPTY string values still show in the COLUMN/ROW groups.
As a solution to this problem, I made sure that these "EMPTY" string fields has at least one empty space in them... Attached is my sample project. Once you run the form, just filter either the ROW or COLUMN group on anything other than the EMPTY string value.
Thanks
Hello,
I am working on the development of an application and I have some doubts in the handling of the PivotFieldList control.
I would like to know how to enter the onclick event of the "Update" button of the PivotFieldList, I want to place some validations when clicking on that button.
I would also like to know how to access the onclick event of the "OK" button that appears in each filter of the fields that are displayed in the PivotGrid, because I also want to add some validations when the button is clicked.
Thanks for the support.
Hello good day.
I am making an application that shows a graph, I use the chartview control, but when there is too much data on the X axis, the information is not distinguished.
I have read that it can be fixed by using MajorTickInterval on the horizontalAxis, I use this lines:
horizontalAxis.LabelFitMode = AxisLabelFitMode.Rotate;
horizontalAxis.MajorTickInterval = 7;
The clearest information is already displayed, but when displaying the information some data should appear in the graph but they are not shown because they are not in the interval.
Is there a solution?
Another question,
Can you remove or hide from the graph the values that have zero or null on the X axis?
Awaiting your comments.
Thank you very much.
Hello
I want to format the thousand separators in a PIVOTVIEW
My Code :
e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
e.CellElement.ForeColor = Color.LightGreen;
e.CellElement.Alignment = ContentAlignment.MiddleRight;
//e.CellElement.Text = String.Format("{0:N3}");
the ForeColor is working,
but aligment right does not work ( see screen below)
and string format gives error
Hello,
I haven't seen this in the demos or documentation (yet?). is it possible to build a third calculated field out of two calculated fields?
Example: CalculatedField1 = Field1 + Field2
CalculatedField2 = Field3 + Field4
CalculatedField3 = calculatedField1 / calculatedField2
thanks in advance
Rolf Kaleveld
Hello,
I haven't seen this in the demos or documentation (yet?). is it possible to display bars, lines or sparklines in the cells of a pivot grid ? is this supported by a public method or property? can this be programmed? is this difficult or extensive?
thanks in advance
Rolf Kaleveld
Hi good morning.
I have made an application which uses the PivotGrid, PivotFieldList and Chartview controls to present the data in the way that an Excel pivot table and chart would.
But I am at a point where the performance of creating the graph is very low compared to Excel.
I comment on the case.
When I add one more field to the PivotGrid in the rows section, the performance to present the graph begins to be slow, in this example that I show I add the "Section" field and to graph it takes 39 seconds.
But if I add a fourth field to that row section of the PivotGrid when plotting the app crashes.
The number of records handled by the PivotGrid is currently 80,000, but with a tendency to grow, the PivotGrid has no problem loading that amount of data.
I know that reading a graph as it is seen is not practical, but the user will manipulate the fields of the PivotGrid until the required information is left, of course with filters included, but while that happens the graph must be updated, but this is not possible because the app crashes, show the image.
I did the exercise of getting the table from the database with all 80,000 records and passing it to Excel and making a dynamic table and graph and I was surprised to see that in Excel when adding the "Section" field it took a couple of seconds and when I added a fourth field, it takes six seconds, also the graph is not practical to read, but the important thing here is that in Excel it does not crash and it presents the graph, I show the image of the exercise in Excel.
I would like you to support me in reaching a solution so that the application does not crash when trying to graph such amount of data.Hello,
please, how can I do a double-click-cell-event to see in a pop-dialog the detail rows in a pivot grid?
I have try it, but It doesn´t works.
I add my basic code of pivot grid (UPDATED WITH THE CODE OF UNDERLYING)
Thank you!
-------
updates of today: Now, the gridview show columns: rowerror, rowstate, ...
I upload the updated code.
Please, can you help me? Thanks!
Hello,
it doesn't work for me. I don't know why...
My code try to build the code with parameters in a table, later I try to add calculatedfield, but I can't see the calculated field in the list... I think is the part of "The important part here is to add the custom field before setting the ItemsSource property", but I don't know how to manage it with my code...
My code:
Try
Me.RadPivotGrid1.AggregatesPosition = PivotAxis.Columns
'MsgBox(numcubo)
'cierro conexión
conexion.Close()
'abro conexión
conexion.Open()
'borro y cojo el detalle de apuntes del mes
strSQL = "SELECT * FROM [Profesionales].[dbo].[COSTES_cubos] where trim(cubo)=trim('" & numcubo & "') order by cubo, tipo, orden "
oCommand = New SqlCommand(strSQL, conexion)
oCommand.CommandTimeout = 0
oCommand.CommandText = strSQL
dataResult = oCommand.ExecuteReader()
If dataResult.HasRows Then
Do While dataResult.Read()
'sql
If dataResult.Item("tipo") = 1 Then
'strSQL = Me.Ini_SQL
strSQL = dataResult.Item("texto").ToString.Trim()
oCommand2 = New SqlCommand(strSQL, conexion)
oCommand2.CommandText = strSQL
oCommand2.CommandTimeout = 0
Cube_DataAdapter2 = New SqlDataAdapter(oCommand2)
Cube_DataSet2 = New DataSet()
Cube_DataAdapter2.Fill(Cube_DataSet2, "SQL")
End If
'fila
If dataResult.Item("tipo") = 2 Then
'Asigno valores
pivotRow = New PropertyGroupDescription()
pivotRow.PropertyName = dataResult.Item("texto").ToString.Trim()
pivotRow.CustomName = dataResult.Item("alias").ToString.Trim()
Me.RadPivotGrid1.ColumnGroupDescriptions.Add(pivotRow)
End If
'columna
If dataResult.Item("tipo") = 3 Then
'Asigno valores
pivotCol = New PropertyGroupDescription()
' Dim pivotC = New PropertyAggregateDescription()
pivotCol.PropertyName = dataResult.Item("texto").ToString.Trim()
pivotCol.CustomName = dataResult.Item("alias").ToString.Trim()
Me.RadPivotGrid1.RowGroupDescriptions.Add(pivotCol)
End If
'datos
If dataResult.Item("tipo") = 4 Then
'Asigno valores
pivotVal = New PropertyAggregateDescription()
pivotVal.PropertyName = dataResult.Item("texto").ToString.Trim()
pivotVal.CustomName = dataResult.Item("alias").ToString.Trim()
pivotVal.StringFormat = dataResult.Item("formato").ToString.Trim()
pivotVal.AggregateFunction = AggregateFunctions.Sum
Me.RadPivotGrid1.AggregateDescriptions.Add(pivotVal)
End If
'filtros
If dataResult.Item("tipo") = 5 Then
Dim description As New PropertyFilterDescription()
Dim condition As New ComparisonCondition()
condition.Condition = Telerik.Pivot.Core.Filtering.Comparison.Equals
'condition.Than = "UK"
description.PropertyName = dataResult.Item("texto").ToString.Trim()
'description.Condition = condition
description.CustomName = dataResult.Item("alias").ToString.Trim()
Me.RadPivotGrid1.FilterDescriptions.Add(description)
End If
'orden
If dataResult.Item("tipo") = 6 Then
Dim propGroupDescription As PropertyGroupDescription = DirectCast(Me.RadPivotGrid1.RowGroupDescriptions(0), PropertyGroupDescription)
If dataResult.Item("sort").ToString.Trim() = "Ascending" Then
propGroupDescription.SortOrder = Telerik.Pivot.Core.SortOrder.Ascending
Else
propGroupDescription.SortOrder = Telerik.Pivot.Core.SortOrder.Descending
End If
propGroupDescription.GroupComparer = New GrandTotalComparer() With {
.AggregateIndex = dataResult.Item("orden")
}
Me.RadPivotGrid1.ReloadData()
End If
Loop
End If
Me.RadPivotGrid1.DataSource = Cube_DataSet2
Me.RadPivotGrid1.DataMember = "SQL"
Using RadPivotGrid1.PivotGridElement.DeferRefresh()
Dim calculatedField As New CommissionCalculatedField()
calculatedField.Name = "Commission"
DirectCast(Me.RadPivotGrid1.DataProvider, LocalDataSourceProvider).CalculatedFields.Add(calculatedField)
End Using
''Cargo layout por defecto
'If Me.Ini_Layout <> "" Then
' Me.RadPivotGrid1.LoadLayout(Me.Ini_Layout)
'End If
'Cargo grafico
Me.RadChartView.DataSource = Me.RadPivotGrid1
Dim verticalAxis As New LinearAxis()
'verticalAxis.AxisType = AxisType.Second
Dim horizontalAxis As New CategoricalAxis()
horizontalAxis.LabelFitMode = AxisLabelFitMode.MultiLine
Me.RadChartView.Area.Axes.Add(horizontalAxis)
Me.RadChartView.Area.Axes.Add(verticalAxis)
Me.RadChartView.ChartElement.LegendElement.Visibility = Telerik.WinControls.ElementVisibility.Visible
'Me.RadChartView.ChartElement.LegendPosition = LegendPosition.Right
Me.RadChartView.ChartElement.LegendElement.Alignment = System.Drawing.ContentAlignment.TopCenter
'Configuracion totales grafico
Me.RadPivotGrid1.ChartDataProvider.IncludeRowSubTotals = False
Me.RadPivotGrid1.ChartDataProvider.IncludeColumnSubTotals = False
Me.RadPivotGrid1.ChartDataProvider.IncludeRowGrandTotals = False
Me.RadPivotGrid1.ChartDataProvider.IncludeColumnGrandTotals = False
'Oculto grafico
Me.SplitContainer2.Panel2Collapsed = True
Me.SplitContainer1.Panel1Collapsed = True
Me.RadChartView.Title = Me.Titulo
'cierro conexión
conexion.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
and the class:
Dear Telerik Team,
We have a scaling problem on a 4K monitor when using RadPivotGrid and calling the RunExport method over the PivotGridSpreadExport instance.
We created the small solution in Visual Studio 2019 which is enough to successfully recreate the issue. Please note that during the development of the solution, the automatic scaling option in Visual Studio was off.
After starting the solution on a 4K monitor and calling the RunExport method over the PivotGridSpreadExport instance, the scaling was automatically performed over the whole solution (all forms and all their components were scaled, see the attached screenshots). At the moment of starting the solution, Scale and Layout option (under Display Settings on Windows) was set to 150% (Recommended). The same invalid result was when we set that option to 175%. Also, we tried to start the solution with every possible value for the AutoScaleMode property (Font, Dpi, None, Inherit) for all existing forms in the solution. The result was the same every time.
We think that the RunExport method makes a problem - the scaling is valid when we skip that call (see the attached screenshots), under the same conditions.
The mentioned solution with the required files can be found on the following link:
Could you please take a look at the solution and investigate the described issue?
Should you have any further questions about the described issue, feel free to contact us.
Thank you in advance for your help.