Telerik Forums
UI for WinForms Forum
2 answers
96 views

In my UI I have a RadChartView, holding some ChartSeries; (in my specific case this is a PolarChart holding a PolarPointSeries).

I have an event which triggers when the user clicks one of the points in this series.

void chart_SelectedPointChanged(object sender, ChartViewSelectedPointChangedEventArgs e)

Using this event, I wish to change the graphical styling of the point that the user selects, at the moment it is selected.

 

It is straightforward to attain the DataPoint that is clicked by the user via

e.NewSelectedPoint;
It is also straightforward to attain the collection of UIChartElements in the plotted series, via
e.NewSelectedSeries.Children;

I can edit the style of any of these plotted UIChartElements, e.g. setting the first one to some image:

e.NewSelectedSeries.Children[0].BackgroundShape.Image = new System.Drawing.Image("MyImage.png");

 

 

I then expected I could edit the graphical styling of the particular point selected by the user using the index of the selected DataPoint:

e.NewSelectedSeries.Children[e.NewSelectedPoint.Index].BackgroundShape.Image = new System.Drawing.Image("MyImage.png)

However, the resulting UIChartElement (e.NewSelectedSeries.Children[e.NewSelectedPoint.Index]) does not correspond to the selected DataPoint (e.NewSelectedPoint); it instead corresponds to one of the other DataPoints in the series.

It appears as though the indexing of e.NewSelectedPointSeries.Children does not correspond to the indexing of e.NewSelectedPoint.DataPoints.

Have I misunderstood the API? Is there a better way of accessing the UIChartElement corresponding to a selected point?

 

For the record, the attempted approach I outline above works correctly with a previous release of Telerik UI for WinForms (2018.1.116.40), but does not work upon upgrading to a newer version (2018.3.1016.40).

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jul 2022
1 answer
155 views

I created the ViewDefinition value of RadGridView using HtmlViewDefinition, and I want to give the Pinned property to the first, second, and third columns.
However, the result is created by duplicating three columns as in the screenshot.

How to fix it?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jul 2022
1 answer
136 views

hi, i use imageEditor  in my winform application, when i run application and try to use crop image with imageEditor the accept and cancel button doesn't shown... like attached picture. please help.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jul 2022
1 answer
99 views

Hello everyone,

Can you please give me some advice? I want to migrate code to Telerik components; there is a class(form) thas has all ui components (textboxes, buttons, etc.) and functionality.

I need to give the user the ability to choose between a radwizard and a tabbedcontrol. But these two need to share the same functionality and ui components. because we don't want to repeat code. We've tried usercontrols, but the code that provides the functionality is so scrambled and depends on data and ui components from differect user controls?

Is there another way to do this? Maybe place the radwizard and tabbed form in a panel?

Thanks in advance,

Adriana

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Jul 2022
1 answer
104 views
With datasoure entered in gridview, I want to focus the row that corresponds to the value by sending the value to the function.

ex)GridView
Column1 Column2
Row1 a1 a2 >> now Focus
Row2 b1 b2

I want to focus on Row2 when I enter b1 in >> function.

private void FocusedRow(string Value){
    for(int i =0; i< grid.RowCount; i ++){
        if(grid.Rows[i].Cells[0].Value.ToString() == Value){
               grid.ClearSelection();
               grid.Rows[i].isSelected = true;
         }
     }
}
>>Current function I created.
Maria
Telerik team
 answered on 19 Jul 2022
1 answer
197 views

HI

When I want to add radtabbedform I am getting this message "Your project uses GAC referenced assemblies. Please upgrade your project.

Which tool I have to use in order to upgrade?

 

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jul 2022
1 answer
124 views

Hi, I have an issue such that when I place my application (which is based on a RadRibbonForm) on to my right hand 4K monitor and then maximise it I get a small amount of "bleed" of my application on to the right hand side of my left monitor.

On inspecting the forms desktop bounds property it see X = 1908, Y = -12, width = 3864, height = 2114. I was expecting X = 1920, Y = 0, width = 3840, height = 2090 which is what is being reported in Screen.AllScreens.

I'm using the lastest version of WinForms and have done what issuggested in this link.

I can reproduce the same behaviour when I run "Demo Application - Telerik UI for WinForms R2 2022 SP1", move it to my large right hand monitor then maximise it.

Do you know of any "easy" way of saving and restoring the main application window size / position in a multi monitor setup with diferrent DPI's? Its a nightmare!

Kind regards
Toby

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jul 2022
0 answers
165 views

HI

I have installed the telerik 2022. The issue that I am facing is that the radtabbedform is not showing this issue also with telerik 2021.

can someone to inform me who can I added?

Thank you in advance

Regards

Ali
Top achievements
Rank 1
 asked on 15 Jul 2022
1 answer
129 views

 

Hello, Telerik users.

There is one problem with me. Data must be entered in each corresponding cell, but data cannot be entered. 
I couldn't find the reason. 
The source code is below.

It's a red syntax, but it doesn't work. Do you know why?

I really hope we can solve this problem. 
Thank you.

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Collections;

namespace TEST
{
    public partial class ViewerControl2 : UserControl
    {
        protected bool IsDesignMode { get { return DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime; } }
        private const int ROWCOUNT = 100;
        private const int COLUMNCOUNT = 100;

        public ViewerControl2()
        {
            try
            {
                InitializeComponent();
                if (IsDesignMode) return;

                SetLayout();
                SetEventHandler();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }


        private void SetLayout()
        {
            try
            {
                this.radGridView1.ShowGroupPanel = false;
                this.radGridView1.VirtualMode = true;
                this.radGridView1.RowCount = 5;
                this.radGridView1.ColumnCount = 19;
                //this.radGridView1.BackColor = Color.Transparent;
                this.radGridView1.ReadOnly = true;
                this.radGridView1.TableElement.DrawFill = false;
                this.radGridView1.TableElement.RowHeight = 50;
                this.radGridView1.TableElement.CellSpacing = 0;
                this.radGridView1.MasterTemplate.ShowRowHeaderColumn = true;
                this.radGridView1.MasterTemplate.ShowColumnHeaders = true;
                this.radGridView1.MasterTemplate.AllowAddNewRow = false;

                createData();

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        private void SetEventHandler()
        {
            try
            {
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        private void createData()
        {

            string getData = "SEND;BIT;1;0;0;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;0;1;1;1;0";

            string[] spstring = getData.Split(';');

            int dataLength = (spstring.Length - 2);

            int horizontal_length = dataLength / 5;

            string[,] lineData = new string[5, horizontal_length];

            int startData = 2;

            for (int j = 0; j < horizontal_length; j++) {

                for (int i = 4; i > -1; i--) {

                    lineData[i, j] = spstring[startData++];

                }
            }

            for (int i = 0; i < 5; i++) {

                for (int j = 0; j < horizontal_length; j++) {

                    this.radGridView1.Rows[i].Cells[j].Style.CustomizeFill = true;

                    this.radGridView1.Rows[i].Cells[j].Style.DrawFill = true;

                    this.radGridView1.Columns[j].HeaderText = j.ToString();

                    if (lineData[i, j] == "1") {

this.radGridView1.Rows[i].Cells[j].Value = 1;
                        this.radGridView1.Rows[i].Cells[j].Style.BackColor = Color.Green;

                    } else {

this.radGridView1.Rows[i].Cells[j].Value = 0;
                        this.radGridView1.Rows[i].Cells[j].Style.BackColor = Color.Black;

                    }
                }
            }
        }
    }
}

                                                                                           
Maria
Telerik team
 answered on 14 Jul 2022
1 answer
117 views

Hello everyone,

I'm learning to use Telerik for winforms, but I have an issue with RadHostItem that hosts a Windows TableLayoutPanel that is generated at runtime and the RadHostItem is placed inside a RadDropDownButtonElement on a RibbonBar.

I'm using  RadHostItem.MinSize for the host that contains the TableLayoutPanel but I've tried a lot of ways to size the host height but neither of them is working as desired.

In what units RadHostItem.MinSize is defined?

For example, I have this code:

                Telerik.WinControls.RadHostItem radHost = new Telerik.WinControls.RadHostItem(panel);
                int heightPerRow = panel.GetRowHeights()[0]; // Height of a row in pixels,
                radHost.MinSize = new Size(panel.Width, heightPerRow * headerRow);

                radDropDownButton.Items.Add(radHost);

But this host is very big for the panel and it distorts it.

I'll appreciate any help.

Thanks in advance,

Adriana

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Jul 2022
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
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?