Telerik Forums
UI for WinForms Forum
1 answer
66 views

Hi ,

I am defining the vertical axis' set of axis labels by defining min max and major step . Even though i set it , it takes some non relevant values like 100,200....1128.5 etc before starting from 0,60,120... Code attached:


            rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider();            
            LinearAxis verticalAxis = chart.View.Axes.Get<LinearAxis>(1);
            verticalAxis.Minimum = 0; //Minutes 0:00
            verticalAxis.Maximum = 1380; //Minutes 23:00
            verticalAxis.MajorStep = 60; //60 minutes in an hour

   public class MyFormatProvider : IFormatProvider, ICustomFormatter
    {
        public object GetFormat(Type formatType)
        {
            return this;
        }
        public string Format(string format, object arg, IFormatProvider formatProvider)
        {
         
                int totalminutes = Convert.ToInt32(arg);
            TimeSpan timeSpan = TimeSpan.FromMinutes(totalminutes);
            return timeSpan.ToString(@"hh\:mm");
        }
    }

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Jun 2021
2 answers
172 views

Hi,

I need to change the height of popup as shown in attached image file, when the dropdown arrow is clicked and popup is shown along with "Close" button.

I have implemented this control exactly as per CustomDropDownList code mentioned in the link:

https://www.telerik.com/support/kb/winforms/dropdown-checkeddropdown-and-list/details/multi-select-drop-down-list

Please help me with the modification needed. 

I do not want to use AutoSize, as the DataSource of dropdown is huge.

Thanks

Nishant

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jun 2021
1 answer
99 views

Hi ,

I am trying to hide the last label in y-axis which is kind of inverted but i have attached the image and code for the same


        

private void LoadBarChart() { chart.View.AreaType = ChartAreaType.Cartesian; chart.AngleTransform = 90; RangeBarSeries rangeBarSeries = new RangeBarSeries(); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 30, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/19/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 89, DateTime.Now.TimeOfDay.TotalMinutes - 100, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 79, DateTime.Now.TimeOfDay.TotalMinutes - 90, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/25/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/24/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/26/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/26/2021")); CategoricalAxis horizontalAxis = new CategoricalAxis(); horizontalAxis.ClipLabels = false; horizontalAxis.ShowLabels = false; horizontalAxis.PlotMode = AxisPlotMode.BetweenTicks; rangeBarSeries.HorizontalAxis = horizontalAxis; chart.View.Series.Add(rangeBarSeries); rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider(); rangeBarSeries.VerticalAxis.ClipLabels = false; rangeBarSeries.VerticalAxis.LabelRotationAngle = -45; rangeBarSeries.VerticalAxis.LabelFitMode = AxisLabelFitMode.Rotate; LinearAxis verticalAxis = chart.View.Axes.Get<LinearAxis>(1); verticalAxis.Minimum = 0; //Minutes 0:00 verticalAxis.Maximum = 1440; //Minutes 23:00 verticalAxis.MajorStep = 60; //60 minutes in an hour verticalAxis.LastLabelVisibility = AxisLastLabelVisibility.Hidden; }

 

    public class MyFormatProvider : IFormatProvider, ICustomFormatter
    {
        public object GetFormat(Type formatType)
        {
            return this;
        }
        public string Format(string format, object arg, IFormatProvider formatProvider)
        {
            int totalminutes = Convert.ToInt32(arg);
            TimeSpan timeSpan = TimeSpan.FromMinutes(totalminutes);
            return timeSpan.ToString(@"hh\:mm");
        }
    }

    LinearAxis verticalAxis = chart.View.Axes.Get<LinearAxis>(1);
            verticalAxis.Minimum = 0; //Minutes 0:00
            verticalAxis.Maximum = durationofdayDST; //Minutes 23:00
            verticalAxis.MajorStep = 60; //60 minutes in an hour
            verticalAxis.LastLabelVisibility = AxisLastLabelVisibility.Hidden;
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jun 2021
1 answer
255 views

Is it possible to add your own operators to the list of valid radvalidatorprovider's own operators.   I have a requirement for two operators:

 

1.  See if a value is already contained with a Dictionary object, if so the operator should cause the validation to fail.

2. See if a folder path specified in a textboxcontrol exists on dick.  If not, then the validation should fail.

 

I know I could do this in code, and simply display a dialog stating the error, but I want consistent validation reporting throughout my application.

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Jun 2021
1 answer
93 views

Greetings,

Is there a way to hide some of the items of the radgridview filter box, or not showing the filter icon at all (marked with red circles in the attached picture) ?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Jun 2021
3 answers
519 views

Hi ,

I am having a range bar series. When hovered over a range data point i need to get the plot value and display as a tooltip of that hovered data point. Attached is the sample code , where i need to capture range data point.


        

private void radChartView1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e) { RadChartElement element = (RadChartElement)sender; //RangeDataPoint dataPoint = (RangeDataPoint)element.;//var item = sender as RadChartElement;//if (item != null)//{// var dataItem = item.DataPoint as RangeDataPoint;// e.ToolTipText = dataItem.High.ToString();//}//e.ToolTipText = "Hi"; }

 


    

private void LoadBarChart() { chart.View.AreaType = ChartAreaType.Cartesian; chart.AngleTransform = 90; RangeBarSeries rangeBarSeries = new RangeBarSeries(); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 30, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/19/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 89, DateTime.Now.TimeOfDay.TotalMinutes - 100, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 79, DateTime.Now.TimeOfDay.TotalMinutes - 90, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/25/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/24/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/26/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/26/2021")); CategoricalAxis horizontalAxis = new CategoricalAxis(); horizontalAxis.ClipLabels = false; horizontalAxis.ShowLabels = false; //horizontalAxis.LabelRotationAngle = -90;//horizontalAxis.LabelFitMode = AxisLabelFitMode.Rotate; horizontalAxis.PlotMode = AxisPlotMode.BetweenTicks; rangeBarSeries.HorizontalAxis = horizontalAxis; chart.View.Series.Add(rangeBarSeries); chart.View.ShowToolTip = true; chart.View.ShowTrackBall = true; ChartTooltipController tooltipController = new ChartTooltipController(); tooltipController.DataPointTooltipTextNeeded += tooltipController_DataPointTooltipTextNeeded; this.chart.View.Controllers.Add(tooltipController); rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider(); rangeBarSeries.VerticalAxis.ClipLabels = false; rangeBarSeries.VerticalAxis.LabelRotationAngle = -45; rangeBarSeries.VerticalAxis.LabelFitMode = AxisLabelFitMode.Rotate; LinearAxis verticalAxis = chart.View.Axes.Get<LinearAxis>(1); verticalAxis.Minimum = 0; //Minutes 0:00 verticalAxis.Maximum = 1380; //Minutes 23:00 verticalAxis.MajorStep = 60; //60 minutes in an hour }

 

 private void tooltipController_DataPointTooltipTextNeeded(object sender, DataPointTooltipTextNeededEventArgs e)
        {
            RangeDataPoint dp = e.DataPoint as RangeDataPoint;
            if (dp != null)
            {
                e.Text = dp.High + " " + dp.Low;
            }
        }


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
107 views
I wanted to set the width to a fixed size for bar rather than auto width set by telerik
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
112 views

I have created a RadGridView and added custom column to display ChartView in it. I am using SetContentCore method to filter data for each row. 

The above feature works fine, but I face one problem. Whenever we try to resize the parent window manually, the SetContentCore method getting called repeatedly which in turn creates multiple chart element within one column.

Please help to find which event triggers this method call, so that I can disable the same.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
149 views

I would like to prevent users from zooming in/out on RadMap. 

Is there any way to disable the zooming option?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
107 views

Hi ,

I am using RadGridView - Telerik.WinControls.GridView(2015.1.331.40) and using CellFormating event . The backcolor doesnt work here whereas the forecolor works . Am i missing anything ?

The code attached:


   private void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            // e.CellElement.ForeColor works though
             e.CellElement.BackColor = Color.Red;
            
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Jun 2021
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?