I tried to update Telerik UI for Winforms today to the latest version. Everything builds and the app runs. However, when I navigate to a form that contains Pie Charts, the app crashes with an unhandled exception and I get the below Overflow error.
What changed with the chartview control that would cause this? Is this something I can fix on my end? or do I need to wait for a bug fix release?
System.OverflowException: Overflow error.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawRectangle(Pen pen, Single x, Single y, Single width, Single height)
at Telerik.WinControls.Paint.RadGdiGraphics.DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, Single penWidth, Brush brush, DashStyle dashStyle, Single[] dashPattern)
at Telerik.WinControls.Paint.RadGdiGraphics.DrawRectangle(RectangleF rectangle, Color color, PenAlignment penAlignment, Single penWidth, DashStyle dashStyle, Single[] dashPattern)
at Telerik.WinControls.Primitives.BorderPrimitiveImpl.DrawRectangle(IGraphics graphics, RectangleF rectangle, Color[] gradientColors, Single width)
at Telerik.WinControls.Primitives.BorderPrimitiveImpl.PaintBorder(IGraphics graphics, Single angle, SizeF scale, RectangleF preferedRectangle)
at Telerik.WinControls.UI.LabelElementDrawPart.Draw()
at Telerik.WinControls.UI.PieLabelElementDrawPart.Draw()
at Telerik.WinControls.UI.PieRenderer.Draw(Object context)
at Telerik.WinControls.UI.ChartArea.Render(Object context)
at Telerik.WinControls.UI.ChartView.Draw(Object context)
at Telerik.WinControls.UI.RadChartElement.PaintElement(IGraphics graphics, Single angle, SizeF scale)
at Telerik.WinControls.RadElement.DoOwnPaint(IGraphics graphics, Single angle, SizeF scale)
at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadItem.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
at Telerik.WinControls.RootRadElement.Paint(IGraphics graphics, Rectangle clipRectangle)
at Telerik.WinControls.RadControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I'm writing with regard to a problem I'm encountering when a user edits RadGridView data that has been filtered.
The filtering is being done through a DataView expression, e.g. CONVERT([NumberOfStaffAvailable],'System.Decimal')>=10
The user then edits the NumberOfStaffAvailable field for one of the displayed rows to be less than 10, so that row is no longer valid as part of the filtered recordset.
When the user presses the Enter key a NullReference exception is thrown, the callstack is listed below.
I've tried calling SuspendLayout() and SuspendUpdate() in the CellBeginEdit event, and resuming them in the CellEndEdit event, but with no luck.
I'd be grateful for any advice on how get around this problem,
I'm using WinControls v. 2016.3.1024.40
Thanks and kind regards
James
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.UI.GridDataCellElement.set_Value(Object value)
at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
at Telerik.WinControls.UI.GridRowBehavior.ProcessEnterKey(KeyEventArgs keys)
at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
at Telerik.WinControls.UI.BaseGridBehavior.ProcessKeyDown(KeyEventArgs keys)
at Telerik.WinControls.UI.BaseGridEditor.OnKeyDown(KeyEventArgs keyEventArgs)
at Telerik.WinControls.UI.RadTextBoxEditor.OnKeyDown(KeyEventArgs e)
at Telerik.WinControls.UI.RadTextBoxEditor.TextBoxItem_KeyDown(Object sender, KeyEventArgs e)
at System.Windows.Forms.KeyEventHandler.Invoke(Object sender, KeyEventArgs e)
at Telerik.WinControls.RadItem.OnKeyDown(KeyEventArgs e)
at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_KeyDown(Object sender, KeyEventArgs e)
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hi,
I fill my grid with one SQL table which contains an int col "SENT".
Its values are -1 for "OK" and 0 for "Not OK".
By default, the radgridview bind checked = 1 and unchecked = 0.
Is it possible to bind the checkbox column of the radgridview with -1=checked and 0=unchecked ?
Thank you.
We have a simple datagrid where the first column contains a Vendor Number and the second is a read-only column containing the name of that vendor. Users can freely enter into the first column, and in the CellValidation event, we verify that the format of what they entered is correct and then lookup the number they entered to populate the second column with the name.
The function looks something like this:
Private
Sub
ValidateCell(sender
As
System.
Object
, e
As
Telerik.WinControls.UI.CellValidatingEventArgs)
Dim
vendNum
As
String
=
""
If
e.ColumnIndex = 0
AndAlso
Not
String
.IsNullOrWhiteSpace(e.Value)
Then
vendNum = e.Value
'Format the Vendor Number
vendNum = FormatVendorNumber(vendNum)
Me
.dgvVendors.CurrentCell.Value = vendNum
'dgvVendors is our data grid
'Find the name of the vendor
e.Row.Cells(1).Value = GetVendorName(vendNum)
End
If
End
Sub
If a cell enters edit mode and the value is changed, then the value displayed in the cell is not updated with the formatted version. However, if a cell enters edit mode and then leaves edit mode with no changes, the formatted value from our function is applied. For example, if you were to add a new row and type "1" in the cell, our format function would convert that to "00001.00", and if you put a breakpoint in the above code, you would see that both Me.dgvVendors.CurrentCell.Value and the vendNum variable would reflect this formatted value. However, once processing completes, the cell will still read "1" in the UI.
Now, after having done that, if you click the same cell to enter edit mode and then click somewhere else, the same function above will run, only this time the cell in the UI will be updated to display "00001.00" properly. Likewise, if you edit that formatted value and remove a zero, the function will fail to update the value, but if after doing that, you click on the cell and then leave it without making any changes, it will be formatted again and the missing zero will be added back. The validating event handler can only update the cell value if that value was not actually changed during editing.
Note: The last line setting e.Row.Cells(1).Value to the Vendor Name always works. We've tried this syntax to apply our updated Vendor Number to Cells(0), but get the exact same results as using Me.dgvVendors.CurrentCell.Value.
Any idea what's going on here or how to correct it?
I use RadGridView and have custom cell element.
I set row height = 300.
For custom cell element, i use RadHostItem to create childe
Ex:
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
var label =
new
Label();
label.Text =
"test"
;
var layout =
new
TableLayoutPanel();
layout.ApplyDefaultStyles(
"Master layout"
);
layout.Dock = DockStyle.Fill;
layout.ColumnCount = 1;
layout.RowCount = 1;
layout.RowStyles.Add(
new
RowStyle(SizeType.Percent, 100F));
layout.ColumnStyles.Add(
new
ColumnStyle(SizeType.Percent, 100F));
layout.Controls.Add(label, 0, 0);
layout.AutoScroll();
var child =
new
RadHostItem(layout) { AutoSizeMode = RadAutoSizeMode.Auto};
Children.Add(child);
}
Result (see the picture in attachments)
Thanks and kind regards
Paul
Hi,
I have inherited a scheduler like this:
Public Class Test
Inherits RadScheduler
End Class
All works very fine. But i have trouble with themes.
I added a application-wide theme like this:
Dim visualStudio2012LightTheme1 = New Themes.VisualStudio2012LightTheme()
ThemeResolutionService.ApplicationThemeName = visualStudio2012LightTheme1.ThemeName
The SchedulerNavigator (also in my Form) changed its style, but my inherited scheduler do not. The scrollbar on the right side has the new theme, and the appointment form and all other "subcontrols".
More details in screenshot.
Can you help me?
Hello,
I tried to bring our scatter plot chart feature from our website to our winform application.
I tried to use chartview to implement this feature, then I cannot find an option to add title into x-axis and y-axis.
So what should I do to add title into x-axis and y-axis?
Attachment #1 is in website version
Attachment #2 is in winform version
Regard,
Paul