Telerik Forums
UI for WinForms Forum
3 answers
118 views
I closed the previous thread a bit early. I'd like to be able to skip deserializing certain shapes (e.g. my custom shapes). Please point me to the event/s I need to respond to to achieve this, or if there's another way. Thanks.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Sep 2017
13 answers
810 views
I was trying to use the RadListView with custom items.
But as in "Run Demo" examples, I can't select a item or better the visual state of the item doesn't change.
Does anybody has a soluton for this? I have looked through the properties, but haven't found any appropriate.
Hristo
Telerik team
 answered on 14 Sep 2017
1 answer
187 views

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 

 

 

Hristo
Telerik team
 answered on 14 Sep 2017
7 answers
246 views

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

Dimitar
Telerik team
 answered on 14 Sep 2017
12 answers
370 views

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);
                }
            }
        }
    }
}

Hristo
Telerik team
 answered on 14 Sep 2017
1 answer
98 views

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

Hristo
Telerik team
 answered on 13 Sep 2017
1 answer
111 views

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

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
19 answers
896 views
Hi,

I have the following:

A Grid View populated by DataSet_A (Columns are Username, Exec_Code, Exec_Name)
Within the Grid View a Combo box column which is populated by DataSet_B (Exec_Code, Exec_Name)  Exec_Code would be a ValueMember and Exec_name would be the DisplayMember

However, the value displayed in the Combo box should be the same value as the Exec_Name from DataSet_A.  When the combo box value is changed the Exec_Code value & Exec_Name value in DataSet_A should be updated.

How can I do this?

Thanks

Barry
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
17 answers
251 views

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.

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
3 answers
216 views

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

Hristo
Telerik team
 answered on 13 Sep 2017
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
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?