Hello,
My apologies if this is a too simple question.
I am trying to work with three cascading Grid Views and do not understand the right event to look for.
1) In the first Grid View, I display a list linked to a datasource. This is the reference list from which the user may select one or more rows (with multi-select = true and FullRowSelect as selection mode)
2) Then this selection create another list which fills/update the second GridView. Most often this is only one row.
3) I would like to fill the third Grid View based on the second Grid View updated list. However, I do not find any row event able to do in all cases. In particular, as most of the time the number of rows in the updated second grid view are the same, neither SelectionChanged nor RowChanged nor CurrentRow_changed are working.
What do I do wrong ?
Thanks for your answers
P.
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,
I am trying to get a new Telerik C# Winsdows Forms Application project started (Screen 1) thro the project wizard in visual studio 2022, but every time I press "create" the program stalls (Screen 2) and I have to break of Visual Studio.
I tried uninstalling Visual studio and Telerik UI for WinForms end reinstalling everything but with no success.
I have no problem opening a normal Windows Form app project thro the wizard.
Do you ever had the same problem?
Kind Regrades,
Dieter
THe Image Saved event is not firing...
in form designer.cs I have:
this.radImageEditor.ImageSaved += new System.EventHandler(this.radImageEditor_ImageSaved);
but a breakpoint here is never hit:
private void radImageEditor_ImageSaved(object sender, EventArgs e)There is a background image property for the gridview, but I can't seem to get it to do anything. I'd like to have a background image cover the entire grid (not just a row/cell). From the properties it seems this is possible, but nothing I do seems to make a change.
Thanks for any help!
Good evening,
I am having some basic issue with connecting a dataview to a chart and getting the piechart to show.
Heres My results:
the first chart is set up as follows:
this.radChartView1.AreaType = ChartAreaType.Pie;
PieSeries series = new PieSeries();
series.DataPoints.Add(new PieDataPoint(50, "Germany"));
series.DataPoints.Add(new PieDataPoint(70, "United States"));
series.DataPoints.Add(new PieDataPoint(40, "France"));
series.DataPoints.Add(new PieDataPoint(25, "United Kingdom") { Label = "My Label" });
series.ShowLabels = true;
series.DrawLinesToLabels = true;
series.SyncLinesToLabelsColor = true;
this.radChartView1.ShowSmartLabels = true;
this.radChartView1.Series.Add(series);
Hardcoded.
the next one is my dataview;
DataSet dsAnswer = new DataSet();
DataView dvResult = new DataView();
var db = Spectrotel.Library.DatabaseUtilities.DatabaseHelper.GetDB("RevIO");
var cmd = db.GetStoredProcCommand("getme");
string strSQLCMD = "";
strSQLCMD = "[spectrotel].[sp_Rpt_Progress_getTodaysUsers]";
cmd = db.GetStoredProcCommand(strSQLCMD);
cmd.CommandTimeout = 10800;
dsAnswer = db.ExecuteDataSet(cmd);
dvResult = dsAnswer.Tables[0].AsDataView();
radChartView2.AreaType = ChartAreaType.Pie;
PieSeries series2 = new PieSeries();
series2.DataSource = dvResult;
series2.DisplayMember = "Bucket";
//series.DataMember = "Cnts"; // it dont like this at all!
series2.ShowLabels = true;
series2.DrawLinesToLabels = true;
series2.SyncLinesToLabelsColor = true;
radChartView2.ShowSmartLabels = true;
radChartView2.Series.Add(series2);
The data coming back from SQL is:
What am I doing wrong here?
Just want the basic C# code to get a piechart to appear like the first with my data.
Thanks.
Deasun.
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: