

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


Hi ,
I am creating the custom checkbox column like this:
public class CustomCheckbox: GridDataCellElement
{
private RadCheckBoxElement ckbCustom;
protected override void CreateChildElements()
{
base.CreateChildElements();
ckbCustom = new RadCheckBoxElement();
ckbCustom.TextAlignment = System.Drawing.ContentAlignment.MiddleRight;
ckbCustom.Size = new Size(20, 20);
this.Children.Add(ckbCustom);
}}
public class CheckboxColumn: GridViewDataColumn
{
public CheckboxColumn(string fieldName)
: base(fieldName)
{
}
public override Type GetCellType(GridViewRowInfo row)
{
if (row is GridViewDataRowInfo)
{
return typeof(CustomCheckbox);
}
return base.GetCellType(row);
}
}
In gridview , i add 2 checkbox columns:
CheckboxColumn checkboxcol1= new CheckboxColumn("High");
checkboxcol1.HeaderText = "High";
checkboxcol1.Width = 100;
checkboxcol1.checkboxcontrol.text = "Text 1 " // I want to config here
// Add Labor Time Custom column
CheckboxColumn checkboxcol2 = new CheckboxColumn("Custom");
checkboxcol2.HeaderText = "Custom";
checkboxcol2.checkboxcontrol.text = "Text 2 " // I want to config here
checkboxcol2.Width = 150;
this.gvUser.Columns.Add(checkboxcol1);
this.gvUser.Columns.Add(checkboxcol2);
How can i config text for checkbox at the time i add in the gridcolumn. Now I have to loop all of the grid rows to add text for checkbox.
Thanks.

Hi,
I would like to be able to create a custom pin with a Usercontrol on it. Is this possible and in addition could you suggest a way to do it? How should the control be hosted?
class MyCustomPin : MapVisualElement
{
}
Regards,
Thomas
