Hi ,
I have Hierarchical Gridview. When loading i loop all of the rows:
foreach(var row in datagridview1.Rows)
{
if(row.Type == "Childrend")
{
var parentRow = row.Parent as GridViewRowInfo; <----- it returns Null
}
}
How can i get parent Row of child Row when loading ? Now at the childRow, i can get the parent Id and i have to loop all of the gridview again to find the parent row by ParentId .
Hello,
We have limited height for ChartView and quite a long text as Y-axis title. Is there a way to make the axis title wrap its text?
ExportToExcelML exporter = new ExportToExcelML(radgridview);
exporter.ExportVisualSettings = true;
string filePath = "c:\test";
string filename = "myfilename" + ".xls";
exporter.RunExport(filePath + "\\" + filename);
using the above snippet how to insert a custom HEADER rows in Excel
Hi,
I would like to change the color of the Axis line, but when I set the BorderColor, I get a border around the label that matches the color I am setting for the Axis line. I don't want a border around the label, I just want to change the color of the line. How do I do that?
This is the code: linearAxis1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(143)))), ((int)(((byte)(142)))));
Laura
Hello,
I have created RadPivotControl dynamically and added it to a windows form. when i double click on data i cannot see the underlying data.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Added by User
using Telerik.WinControls.UI;
using Telerik.Pivot.Core;
using System.Data;
using System.Windows.Forms;
namespace BusinessLogic
{
public class RadControl
{
public RadPivotGrid fn_CreatePivotControl(DataTable inDt)
{
RadPivotGrid pivotGrid = new RadPivotGrid();
pivotGrid.DataSource = inDt;
pivotGrid.Name = "pivotFilteredData";
pivotGrid.ThemeName = "EvalFormTheme";
pivotGrid.ShowFilterArea = true;
GroupNameComparer groupNameComparer = new GroupNameComparer();
foreach (DataColumn col in inDt.Columns)
{
List<string> list = new List<string>();
if (col.ColumnName.ToString().ToUpper() != "PV")
{
list = inDt.AsEnumerable().Select(p => p.Field<String>(col.ColumnName.ToString())).Distinct().ToList();
}
string strColumnName = col.ColumnName;
if (list.Count == 1)
{
PropertyFilterDescription propertyFilterDescription1 = new PropertyFilterDescription();
propertyFilterDescription1.Condition = null;
propertyFilterDescription1.CustomName = null;
propertyFilterDescription1.PropertyName = strColumnName;
pivotGrid.FilterDescriptions.Add(propertyFilterDescription1);
}
else if (strColumnName.ToUpper() == "PV")
{
PropertyAggregateDescription propertyAggregateDescription1 = new PropertyAggregateDescription();
SumAggregateFunction sumAggregateFunction1 = new SumAggregateFunction();
propertyAggregateDescription1.AggregateFunction = sumAggregateFunction1;
propertyAggregateDescription1.CustomName = null;
propertyAggregateDescription1.IgnoreNullValues = false;
propertyAggregateDescription1.PropertyName = strColumnName;
propertyAggregateDescription1.StringFormat = null;
propertyAggregateDescription1.StringFormatSelector = null;
propertyAggregateDescription1.TotalFormat = null;
pivotGrid.AggregateDescriptions.Add(propertyAggregateDescription1);
}
else if (strColumnName.ToUpper() == "PERIOD" || strColumnName.ToUpper() == "TIMESLICE")
{
PropertyGroupDescription propertyGroupDescription = new PropertyGroupDescription();
propertyGroupDescription.CustomName = null;
// propertyGroupDescription.GroupComparer = groupNameComparer;
propertyGroupDescription.GroupFilter = null;
propertyGroupDescription.PropertyName = strColumnName;
propertyGroupDescription.ShowGroupsWithNoData = false;
propertyGroupDescription.SortOrder = Telerik.Pivot.Core.SortOrder.Ascending;
pivotGrid.ColumnGroupDescriptions.Add(propertyGroupDescription);
}
else if (strColumnName.ToUpper() == "SCENARIO")
{
PropertyFilterDescription propertyFilterDescription1 = new PropertyFilterDescription();
propertyFilterDescription1.Condition = null;
propertyFilterDescription1.CustomName = null;
propertyFilterDescription1.PropertyName = strColumnName;
pivotGrid.FilterDescriptions.Add(propertyFilterDescription1);
}
else
{
PropertyGroupDescription propertyGroupDescription = new PropertyGroupDescription();
propertyGroupDescription.CustomName = null;
propertyGroupDescription.GroupFilter = null;
propertyGroupDescription.PropertyName = strColumnName;
propertyGroupDescription.ShowGroupsWithNoData = false;
propertyGroupDescription.SortOrder = Telerik.Pivot.Core.SortOrder.Ascending;
pivotGrid.RowGroupDescriptions.Add(propertyGroupDescription);
}
}
pivotGrid.ColumnGrandTotalsPosition = Telerik.WinControls.UI.TotalsPos.None;
pivotGrid.ColumnsSubTotalsPosition = Telerik.WinControls.UI.TotalsPos.None;
// row total
pivotGrid.RowGrandTotalsPosition = Telerik.WinControls.UI.TotalsPos.None;
pivotGrid.RowsSubTotalsPosition = Telerik.WinControls.UI.TotalsPos.None;
foreach (PropertyGroupDescriptionBase groupDescription in pivotGrid.RowGroupDescriptions)
{
DistinctValuesProvider valuesProvider = ((IDistinctValuesDescription)groupDescription).GetDisctinctValuesProvider();
List<object> distinctItems = new List<object>(valuesProvider.DisctinctValues);
}
pivotGrid.MouseDoubleClick += pivotGrid_MouseDoubleClick;
return pivotGrid;
}
private void pivotGrid_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
RadPivotGrid pivotGrid = (RadPivotGrid)sender;
PivotCellElement cell = pivotGrid.ElementTree.GetElementAtPoint(e.Location) as PivotCellElement;
if (cell != null)
{
IGroup row = cell.Row.Group; IGroup column = cell.Column.Group;
LocalDataSourceProvider localProvider = pivotGrid.DataProvider as LocalDataSourceProvider;
localProvider.GetUnderlyingData(row, column);
}
}
}
}
}
I have an issue with the DateTimePicker.
I'm using this control mainly for keyboard entry.
I live in The Netherlands and our date format is "dd-mm-yyyy".
The issue is as follows:
If the current month has less than 31 days (like this month september for example), we are not able to enter a date that starts with 31 (like 31-08-2017).
This happens because as soon as I start typing, todays date appears in the editor. This means the day is validated as a day in the month september.
We would have to change the month first, than move back to the day portion and correct it. But, as you would admit, this is unnecessary cumbersome.
Is it possible to not have a default date appear as soon as the user starts typing?
If not, is it possible to have a default date like 01-01-2017 when the user starts typing?
Tnx for your help
I am extremely busy developing a WinForms application and do not have the time to learn how to use the theme builder. Telerik has some themes that I really like but I want to make some small modifications to them and also create one new theme based on Telerik's new material theme.
If someone has experience creating themes who could help me, I will compensate you for your time.
Thanks,
Mike
Email: mike-moreno@outlook.com