Telerik Forums
UI for WinForms Forum
3 answers
136 views

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

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Feb 2023
1 answer
78 views

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.

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Nov 2022
1 answer
84 views

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.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Nov 2022
1 answer
70 views

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

Maria
Telerik team
 answered on 04 Oct 2022
2 answers
65 views

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

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Aug 2022
1 answer
63 views

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

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Aug 2022
1 answer
92 views

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.

Or is this a limitation of control?, to think of an alternative.

Thanks for your attention.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Aug 2022
1 answer
83 views

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!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Apr 2022
3 answers
113 views

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:

 


    Public Class CommissionCalculatedField
        Inherits CalculatedField
        Private extendPriceField As RequiredField
        Public Sub New()
            Me.Name = "Commission"
            Me.extendPriceField = RequiredField.ForProperty("importe")
        End Sub
        Protected Overrides Function RequiredFields() As IEnumerable(Of RequiredField)
            Return New List(Of RequiredField) From {extendPriceField}
        End Function
        Protected Overrides Function CalculateValue(aggregateValues As IAggregateValues) As AggregateValue
            Dim aggregateValue = aggregateValues.GetAggregateValue(Me.extendPriceField)
            If aggregateValue.IsError() Then
                Return aggregateValue
            End If
            Dim extendedPrice As Double = aggregateValue.ConvertOrDefault(Of Double)()

            Return New DoubleAggregateValue(extendedPrice * 0.1)

            Return Nothing
        End Function
    End Class                
Hristo
Telerik team
 answered on 18 Apr 2022
2 answers
99 views

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:

https://webshare.bexelconsulting.com/public/bexel/607-jenwspc47/Telerik%20-%20PivotGridSpreadExport.RunExport%20-%20Scaling%20Problem.zip

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.

Bexel Consulting
Top achievements
Rank 1
Iron
 answered on 29 Oct 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?