Telerik Forums
UI for WinForms Forum
1 answer
156 views

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 .

 

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

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?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Sep 2017
9 answers
9.7K+ views
How do I make a label span multiple lines?

I'd like to avoid using multiple labels.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Sep 2017
3 answers
137 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
850 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
213 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
276 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
416 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
121 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
126 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
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?