Telerik Forums
UI for WinForms Forum
1 answer
138 views

Hallo,

is there any way to only get a direkt right click on a node? The GetElementAtPoint get's the node even if the cursor is outside of the (visible part) of the node but at the same hight (I think this is the same reason why the hottrack reacts outside of the visible part of the node)

I'd use the NodeMouseClick but the event args aren't derived from MouseEventArgs so there is no MousePosition/MouseButton (I think this should be changed)

private void radTreeView1_MouseDown(object sender, MouseEventArgs e)
{
    if (e.Button == System.Windows.Forms.MouseButtons.Right)
    {
        TreeNodeElement el = radTreeView1.ElementTree.GetElementAtPoint(e.Location) as TreeNodeElement;
        ...
    }
}

 

So I need to distinguish between a direkt right click on a node and a right click on the treeview (the white part)

Hristo
Telerik team
 answered on 07 Feb 2017
1 answer
87 views

I am getting different XY coordinates on the CompleteDragging event than what the actual shape XY coordinates are (see image file).  Any clue how to get the correct XY coordinates? It seems like I am getting the XY of the center of the shape.  Below is the code I am using:

 

private void DragService_CompleteDragging(object sender, PositionChangedEventArgs e)
{
    label13.Text = $"{e.NewPosition.X},{e.NewPosition.Y}";
 
    foreach (var shape in radDiagram1.Shapes)
    {
        var myShape = shape as RadDiagramShape;
        if (myShape.Text == _asset.AssetTag)
        {
            label14.Text = $"{myShape.X},{myShape.Y}";
            break;
        }
    }
}


Dimitar
Telerik team
 answered on 07 Feb 2017
1 answer
319 views

I am trying to find the best way to add a secondary Y axis for a line series. An example of this would be a Fahrenheit secondary Y axis for a Celsius primary Y axis. The best way I have figured out so far is to create a dummy series that is not visible and that shares the same X axis and color as the primary axis. The minimum and maximum values are then set based on the ActualRange of the primary axis. This is not ideal because the secondary axis ticks aren't being generated on round numbers.

Is there a better way to do this?

Is there an event that I can use to update the secondary Y axis minimum and maximum when the ActualRange of the primary axis changes?

// Create data table with test data
DataTable dataTable = new DataTable();
dataTable.Columns.Add(new DataColumn("Date", typeof(DateTime) ));
dataTable.Columns.Add(new DataColumn("Temp", typeof(float) ));
dataTable.Rows.Add(new DateTime(2016, 2, 1), 245.0f);
dataTable.Rows.Add(new DateTime(2016, 3, 1), 248.0f);
dataTable.Rows.Add(new DateTime(2016, 4, 1), 238.0f);
 
// Create line series for test data
LineSeries lineSeries1 = new LineSeries();
lineSeries1.Name = "Temperature";
lineSeries1.Spline = false;
lineSeries1.ValueMember = "Temp";
lineSeries1.CategoryMember = "Date";
lineSeries1.DataSource = dataTable;
 
// dummy line series for secondary axis
LineSeries dummyLineSeries = new LineSeries();
dummyLineSeries.Name = "Dummy Temperature";
dummyLineSeries.Spline = false;
dummyLineSeries.IsVisible = false;
dummyLineSeries.BorderColor = lineSeries1.BorderColor;
 
// X Axis definition
DateTimeCategoricalAxis DTcategoricalAxis1 = new DateTimeCategoricalAxis();
DTcategoricalAxis1.PlotMode = AxisPlotMode.OnTicks;
DTcategoricalAxis1.LabelFormat = "{0:MMMyy}";
DTcategoricalAxis1.Title = "Month-Year";
DTcategoricalAxis1.AxisType = Telerik.Charting.AxisType.First;
 
// Primary Y Axis definition
LinearAxis linearAxis1 = new LinearAxis();
linearAxis1.Title = "Temperature (°C)";
linearAxis1.AxisType = Telerik.Charting.AxisType.Second;
 
// Secondary Y Axis definition
LinearAxis linearAxis2 = new LinearAxis();
linearAxis2.Title = "Temperature (°F)";
linearAxis2.AxisType = Telerik.Charting.AxisType.Second;
linearAxis2.HorizontalLocation = AxisHorizontalLocation.Right;
 
// Add Axes to the line series
lineSeries1.HorizontalAxis = DTcategoricalAxis1;
lineSeries1.VerticalAxis = linearAxis1;
 
dummyLineSeries.HorizontalAxis = DTcategoricalAxis1;
dummyLineSeries.VerticalAxis = linearAxis2;
             
// Add line series to chart
radChartView1.Series.AddRange( lineSeries1, dummyLineSeries);
 
// Force secondary axis range to match adjusted
linearAxis2.Minimum = linearAxis1.ActualRange.Minimum * 1.8 + 32.0;
linearAxis2.Maximum = linearAxis1.ActualRange.Maximum * 1.8 + 32.0;
Hristo
Telerik team
 answered on 07 Feb 2017
1 answer
70 views

I have a need of hiding the richtexteditor, populating it, and then doing a PrintPreview.  I have discovered that if the control's "Visible" property is false, it does not work. The document is empty.  It also does not work if you dynamically create the control at run-time. Thoughts?  Obviously, I can add a control to the form and hide it behind another control, but that's a hack.

 

Dim foo As New RadRichTextEditor
Dim provider As New HtmlFormatProvider()
 
foo.Document = provider.Import("<html><body>All Notes for Project Foo<br/><br/></body></html>")
foo.PrintPreview()
Ralitsa
Telerik team
 answered on 07 Feb 2017
5 answers
310 views

Hi,

I've written a Custom Editor with a TextBox and two buttons (I simply made few changes at the code of your CustomEditor Demo), it seem to work fine except for the fact that if I set the Multiline propery of the TextBoxItem to true I cannot change the text anymore (I looks like it became ReadOnly), so I suppose it isn't so simple.

How can I write a custom editor that accept multiline text ?

 

Alessio Bulleri
Top achievements
Rank 1
 answered on 06 Feb 2017
5 answers
177 views
Hi,

I would like to display a ToolTip for a GridView Cell only if the value of the cell is too large to fit within the column width?  The ToolTip would be the complete cell value.  Normally, the value shows an ellipse when it is trimmed but I can not find a property to indicate this.

Thanks,
Mike
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Feb 2017
2 answers
200 views

Hi

I want a Not selectable ListViewElement

by not selectable , I mean you can not select it's items

I have it as custom item in a parent listview

Dimitar
Telerik team
 answered on 06 Feb 2017
4 answers
157 views
Hi,

When I go into the "Property builder" I only have 2 theme available :

 > Control Default
 > Telerik

What should I do to have more theme available into the dropdown menu (like Office silver or aqua) ?

Thanks in advance for your help.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Feb 2017
6 answers
130 views

Right to Left All Items radRibbonbar Form (Normal Form):

 

Hi 

saeid
Top achievements
Rank 1
 answered on 03 Feb 2017
3 answers
236 views

I have a form with a grid that contains just a combobox and I'm wondering what is the proper way to have that value stick, by stick I mean causing the CellValueChangedEvent, when I select a value in the list and then move to another control.

The relevent events that get fired are:

ValueChanging

ValueChanged

and then the next event is

Leave

I've played around with calling EndEdit, however I don't believe I'm calling it at the right point.

 

In the _Leave event I get the new row as

var newRow = lstData.CurrentRow as GridViewNewRowInfo, however the Cells["ComboColumn"].Value is null and this is becuase CellValueChanged hasn't fired yet.

-Michael

Dimitar
Telerik team
 answered on 03 Feb 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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?