Telerik Forums
UI for WinForms Forum
2 answers
835 views

Hi Guys

I can't work out why , but every cell in every grid in my application ( different forms and Grids) all throw an exception when you try to copy a cell.

This happens for both the right click, select copy , or with Ctrl C 

System.Runtime.InteropServices.COMException occurred
Message: Exception thrown: 'System.Runtime.InteropServices.COMException' in System.Windows.Forms.dll
Additional information: Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))

 

 

Been googling like mad , found the info about copy events for the grid. These seem to fire (3 times each for each format) and then the exception happens. Even calling cancel in the event or trying to format the value returned still causes the exception.

I am using version v4.0.30319 , but I don't see any fixes in later versions for this.

Some trouble shooting ideas would be greatly appreciated

 

Regards

Rob

Rob
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 28 Oct 2020
3 answers
504 views

Hello,

I'm using RadWinForms Controls version 2018.1.220.40, windows 10 64 bit,  Visual Studio 2017 c#. When I create a new project the default form it creates the theme will never apply to. I have tried deleting this form and adding a new one but with the same result. I have deleted it several times added new forms and still the same result. It appears that what ever form it calls first the theme will not apply to it. I have attempted to add the theme to the form in code also same result.

Thanks in advance.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Oct 2020
1 answer
295 views

Hello,

Ive built a Winforms RadForms application with VB.Net. The application contains several forms that contains several rad controls. The form contains several buttons when clicked changes the theme. But it takes around 3-4 seconds for the theme to change. Now what I want to achieve is the application must show a message box with the message- "Theme Changed" when the theme has changed. I was wondering if there are any events that can be fired during a theme change and found one event named "ThemeNameChanged".  I set it up like this:

Private Sub (source as Object, args As ThemeNameCahngedEventArgs) Handles Me.ThemeNameChanged

Msgbox("Theme Changed")

EnsSub

Then I switch the theme with the click of a button:

 

Private sub Button1_Click(...) Handles Button1.Click

ThemeResolutionService.ApplicationThemeName = "TelerikMetroBlue"

End Sub

But when click Button1 the theme changes but the message is not displayed once the theme has changed. So How Do I dsiplay a message when the theme has changed?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2020
3 answers
687 views

Hi,

I want to set my Label Text next to LabelLine on Donut Chart.

i use this code to create my chart, but somehow the label text placed on top of label line, not next to it (see attachment for my desired result)

 

Thank you in advance

 

private void CreateRadChartDonut(ref string p_strFileName)
        {
            RadChartView chartDonut = new RadChartView();
            //chartDonut = radChartView1;
            chartDonut.Size = radChartView1.Size;
            chartDonut.Dock = DockStyle.Fill;
            chartDonut.LabelFormatting += radChartView_LabelFormatting;
 
            chartDonut.View.Margin = new Padding(65); //set pie padding
            chartDonut.AreaType = ChartAreaType.Pie; //set to pie chart type
            chartDonut.Series.Clear();
 
            #region Config New Chart Series
            Telerik.WinControls.UI.DonutSeries smartPie = new Telerik.WinControls.UI.DonutSeries();
            smartPie.Name = "Series";
            smartPie.InnerRadiusFactor = 0.35f; //setting inner radious doughnut so it can change as Doughnut Chart
            smartPie.LabelMode = PieLabelModes.Horizontal;
            smartPie.ShowLabels = true; //show label text
            smartPie.DrawLinesToLabels = true; //show label line connector
            smartPie.LinesToLabelsColor = Color.FromArgb(197, 158, 115); //set label line connector color
            smartPie.SyncLinesToLabelsColor = false; //set true if we want to set label line color the same as series color
 
            //set angle range starting position
            AngleRange range = smartPie.Range;
            range.StartAngle = 250;
            smartPie.Range = range;
            smartPie.LabelsOffsetFromCenter = 1.56f;
             
            #endregion
 
            #region Generate Data
            List<DataChart> lData = new List<DataChart>();
            lData.Add(new DataChart("Savings", 50));
            lData.Add(new DataChart("Deposit", 25));
            lData.Add(new DataChart("BancaAssurance", 12.5));
            lData.Add(new DataChart("MutualFund", 12.5));
            #endregion
 
            //add slice area
            foreach (DataChart d in lData)
            {
                PieDataPoint point = new PieDataPoint(Convert.ToDouble(d.Value), d.Name);
                point.Label = d.Name.ToUpper();
                point.Label = string.Format("{0} | {1}%{2}{3} {4}", d.Name.ToUpper(), d.Value, Environment.NewLine, "IDR", Convert.ToDouble(d.ValueRp).ToString("N0"));
                smartPie.DataPoints.Add(point);
            }
            chartDonut.Series.Add(smartPie);
 
            #region Setting Series Slice Color
            chartDonut.Series[0].Children[0].BackColor = Color.FromArgb(193, 152, 105);
            chartDonut.Series[0].Children[1].BackColor = Color.FromArgb(207, 175, 140);
            chartDonut.Series[0].Children[2].BackColor = Color.FromArgb(221, 198, 173);
            chartDonut.Series[0].Children[3].BackColor = Color.FromArgb(235, 221, 206);
            chartDonut.Series[0].IsVisible = true;
            #endregion
 
            ExportChart(ref p_strFileName, chartDonut, new Size(690, 360));
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2020
7 answers
454 views
Hi,

I have already managed to add a Help Button to my BaseForm (see attached image).
I would love to have the same little help icon with the Click handler added just before the Scroll Buttons on the RadPageView Strip Element.
Here is the code for the Help Button:

RadButtonElement _btnHelp = new RadButtonElement();
_btnHelp.ShowBorder = false;
_btnHelp.Image = global::labs.STAR.App.Properties.Resources.helpicon;
_btnHelp.ClickMode = ClickMode.Press;
_btnHelp.Click += _btnHelp_Click;
this.FormElement.TitleBar.SystemButtons.Children.Insert(0, _btnHelp);



thx in advance,
Darko
Swaroop
Top achievements
Rank 1
Veteran
 answered on 25 Oct 2020
13 answers
752 views
I have a list view that has numbers in the cells. If the number is negative I would like the text to turn red.

Is the list view capable of this?

I can change the row text color, but not a single cell.

I am also using a ListViewDataItem variable as well.
pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 24 Oct 2020
5 answers
601 views
Is it possible to create a chart like the attached image? 

The chart i am trying to create currently has a stacked bar for enquiries and orders for each month of  a year, i want to add another year to this chart to compare so would need another stacked bar for each month in the new year.

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Oct 2020
2 answers
686 views

Hello,

The gray background of the progress bar seems to be theme specific, is it possible to change it to white/transparent without a custom theme?

 

Attaching a screen shot to indicate the background fill in question.

Marija
Top achievements
Rank 1
 answered on 23 Oct 2020
1 answer
138 views

Hi,

I have multiple rows. Each row has a different currency. How to find sum in Indian currency using summary row.

please find attached.

waiting for your favorable response. 

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Oct 2020
1 answer
154 views

Hello Telerik Support Team,

I'm trying to add a custom button for the RadImageEditor for my application. When I try to do so using

RadMenuItem cst = new RadMenuItem("Item");

radImageEditor1.ImageEditorElement.CommandsElement.CommandsStackEleemnt.Children.Add(cst);

This does get me the button I need, but I am unable to extend add an event handler to this button.

However If I were to create a button and add it to the element by extending RadMenuItem to override the onclick event within a custom class like so:

CustomMenuItem custom = new CustomMenuItem("CustomMenuItem");

radImageEditor1.ImageEditorEleemnt.CommandsElement.CommandsStackElement.Children.Add(custom);

This will get me a flat generic box the form in which I am unable to modify the style of the button to fit with the rest of the form, however this approach will allow me to define my event handler. 

How can I go about it to create a proper button within the image editor side bar (to clarify the side bar below the command elements, and be able to setup the onclick to run the function needed as intended?

Thanks,

Nadya | Tech Support Engineer
Telerik team
 answered on 22 Oct 2020
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?