Telerik Forums
UI for WinForms Forum
0 answers
34 views

I'm trying to get a barcodeview  routine working, but it keeps telling me that the Overload resolution fails - actually on every single (6) of them!

Would you mind looking at this code and letting me know what needs to be changed to get this to work?

    Private Sub GenerateBarCode()
        Dim RadBarcodeView1 As RadBarcodeView = New RadBarcodeView()
        RadBarcodeView1.Height = 10
        RadBarcodeView1.Width = 60
        Dim code39Extended1 As Telerik.WinControls.UI.Barcode.Symbology.Code39Extended = New Telerik.WinControls.UI.Barcode.Symbology.Code39Extended()
        RadBarcodeView1.Symbology = code39Extended1
        RadBarcodeView1.Value = "123456"
        RadBarcodeView1.LoadElementTree()
        Dim fileName As String = IO.Path.Combine(Application.StartupPath, $"{RadBarcodeView1.Value}.png")
        If IO.File.Exists(fileName) Then
            IO.File.Delete(fileName)
        End If
        Dim BarcodeSize As New Size(100, 10)
        Dim img As Image = RadBarcodeView1.ExportToImage(fileName, BarcodeSize, Imaging.ImageFormat.Png)
        img.Save(fileName, System.Drawing.Imaging.ImageFormat.Png)
    End Sub

Please refer to the attached image

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 updated question on 10 Feb 2025
2 answers
36 views

Nothing is displayed when I try this code:

UserControls.ucCallout oCallOutForm = new UserControls.ucCallout();            

radCallout.AssociatedControl = oCallOutForm;

radCalloutMarkers.Show(MyCustomUserControl);

When I change the last line to this, the CallOut form is being displayed, but it's being displayed on top of everything else (even other open application windows):

radCalloutMarkers.Show(System.Windows.Forms.Cursor.Position);

I would like to have a callout form which contains a button and when clicked it should show a flyout input form to enter some text.   When I use the callout pointing to the cursor position instead of a control, the flyout window is painted behind the callout form so no user input is possible.

Sven
Top achievements
Rank 1
Iron
 updated answer on 06 Feb 2025
1 answer
23 views

Since there isn't a built-in context menu for a MaskedEdit, I tried to add one. However, I can't get it to display. 

I added a contextMenuStrip and then added a menuItem.

I added the menuItem click event

I added the contextMenuStrip to the MaskedEdit field

When I test it (right-click on the field), nothing happens.

I also tried other events on the MaskedEdit field like the mouse click event and it never calls it when I click on the field.

What am I missing? (screenshot attached)


		private void miCopy_Click(object sender, EventArgs e)
		{
			try
			{
				TextBoxBase thiscontrol;
				thiscontrol = (TextBoxBase)ActiveControl;
				if (thiscontrol.SelectionLength > 0)
				{
					thiscontrol.Copy();
				}
			}
			catch (Exception)
			{
			}
		}

 

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Feb 2025
1 answer
29 views

¡Hi everyone! I have this issue loading a pdf with the RadPdfViewer.
On the RadPdfViewer DataError event i got an InvalidOperationException with only the "Stack empty" messsage,

 

This is the stacktrace of the exception thown by the PdfExceptionEventArgs

   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Stack`1.Pop()
   at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.DocumentModel.PdfContext.RestoreGraphicState()
   at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.ContentStreamParser.InvokeGeneralGraphicsStateOperator(String op, Object[] pars)
   at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.ContentStreamParser.InvokeOperator(String op, Object[] pars)

Can you please tell me what could be the possible reason of this issue ? Thanks

PS. The file is on the zip attached

Nadya | Tech Support Engineer
Telerik team
 answered on 05 Feb 2025
1 answer
19 views

Regarding the RadMaskedEditBox using the provided Email MaskType:

The error validation icon displays when there is an error, but it doesn't prevent the user from leaving the field. 

How can I prevent the user from leaving the field with this MaskType?

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Feb 2025
1 answer
35 views

Hey there!

I've been converting several programs that use 'RadGridView' to'VirtualMode' lately, and yesterday I encountered an issue with one that has template relations. I tried a few approaches, but I can't seem to make it work with the same logic I was using before. However, I did manage to get it working with the 'RowSourceNeeded' event, but it requires me to iterate over the same records more times than I'd like.

Is there another way to achieve this, or is this the only available solution?

 

JP

Nadya | Tech Support Engineer
Telerik team
 answered on 31 Jan 2025
1 answer
30 views

Hi,

I would like to use a set of radio buttons and have them render using the 'button' appearance (i.e. instead of the default circular checkbox appearance).  For a normal Winforms System.Windows.Forms.RadioButton control, this is accomplished by setting the RadioButton.Appearance property to 'Button'.  However, the Telerik RadRadioButton control does not have that property.  How can this be accomplished with the Telerik radio button control?

Thanks!

--Darren

 

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jan 2025
1 answer
30 views

I still haven't found a solution to this problem: https://www.telerik.com/forums/cellvalidating-event-question

asked

1. When user inputs an invalid value for a cell, we can use ErrorText to show an error message in the RowHeaderColumn. Normally, the ErrorText will be cleared after the user corrects the value. Sometimes the user will just press Esc key to cancel the input value, in this case the CellValidating event won't get fired and the ErrorText will remain shown on the RowHeaderColumn. This behavior will make the user feel confused.

answered

1. CellValidating event occurs only when a cell value is changed. In case when Esc is pressed, the value remains the same and no validation is needed. However, you can handle CellEndEdit event in this case and reset the ErrorText property.


Private Sub grdURLs2_UserAddingRow(sender As Object, e As GridViewRowCancelEventArgs) Handles grdURLs2.UserAddingRow
    Try
        If TypeOf e.Rows(0) Is GridViewNewRowInfo AndAlso
        TryCast(e.Rows(0).Cells(0).ColumnInfo, GridViewDataColumn) IsNot Nothing AndAlso
           TryCast(e.Rows(0).Cells(1).ColumnInfo, GridViewDataColumn) IsNot Nothing Then
            If e.Rows(0).Cells(0).Value Is Nothing OrElse
            String.IsNullOrEmpty(Trim(e.Rows(0).Cells(0).Value)) Then
                e.Cancel = True
                DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Empty!"
            ElseIf e.Rows(0).Cells(1).Value Is Nothing OrElse
                String.IsNullOrEmpty(Trim(e.Rows(0).Cells(1).Value)) Then
                e.Cancel = True
                DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Empty!"
            ElseIf e.Rows(0).Cells(1).Value IsNot Nothing Then
                For Each row In grdURLs2.Rows
                    If e.Rows(0).Cells(1).Value = row.Cells(1).Value Then
                        e.Cancel = True
                        DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Exists!"
                    End If
                Next
            End If
        End If
    Catch ex As Exception
        txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
    End Try
End Sub

Private Sub grdURLs2_CellEndEdit(sender As Object, e As GridViewCellEventArgs) Handles grdURLs2.CellEndEdit
    Try
        If TypeOf e.Row Is GridViewNewRowInfo Then
            DirectCast(e.Row, GridViewNewRowInfo).ErrorText = String.Empty
        End If
    Catch ex As Exception
        txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
    End Try
End Sub

This doesn't work. The CellEndEdit event does not fire.


Nadya | Tech Support Engineer
Telerik team
 answered on 24 Jan 2025
2 answers
40 views
I've tried implement custom filter as per  Permanent editor in a filter cell - Telerik UI for WinForms instruction
but when I run that project drop down list looks too small to hold its content. Please look at attached screenshot. 

Could you advise me how to properly calculate size of dropdown, or in other way make it fit its content. The only way I found is to set 
 this.dropDown.MinSize = new Size(150, 30); 

inside CreateChildElements method. But I'm not sure this is the best way to fix this issue. Could you please advise me how to handle those kinds of size issues?

Ruslan
Top achievements
Rank 1
Iron
 answered on 23 Jan 2025
1 answer
45 views

Hi Support Team,

I am having difficulties using WinForms UI components in combination with System.Windows.Forms.TableLayoutPanel. I wanted to follow the suggestions of using this panel to create HDPI aware UIs.

Component nesting is like this:

  • RadForm
    • RadLayoutControl
      • LayoutControlTabbedGroup
        • LayoutControlGroupItem1
        • LayoutControlGroupItem2
          • LayoutControlItem1
            • TableLayoutPanel1
      • LayoutControlItem2
        • TableLayoutPanel2
      • LayoutControlItem3
        • RadButton1

When I am in the default "CSharp Form Editor" I'm not able to place the UI components into the TableLayoutPanel. The designer always tries to create a new LayoutControlItem in the RadLayoutControl. E.g. when trying to add a RadButton into the TableLayoutPanel2, it creates the RadButton1 right next to the TableLayoutPanel2 (or below/above;) into a new LayoutControlItem3, but not IN the desired column/row of the TableLayoutPanel2.

I tried a workaround by creating a standard Form and placing a TableLayoutPanel into it. Then adding all the UI components I want in it and afterwards copy+paste it into the LayoutControlGroupItem of another RadForm. However this approach seems to not attach it to any LayoutControlItem by using the Designer. It just gets added to the RadLayoutControl. I then tried to manually write the Designer Code by looking at how the Example code is generated, but that also is not reliable and I'm having an issue with getting the TableLayoutPanel docked to the "manually created" LayoutControlItem.

My question:

  1. How can I get this to work or is this combination not intended/supported?

Environment

  • Visual Studio 2022 v17.12.4
  • .NET Framework 4.8
  • Telerik WinForms UI 2024.4.1113.48

Added my example project and a screenshot of the designer while dragging a new RadLabel (or similar) onto the TableLayoutPanel.

Edit1: Added another screenshot of intended behavior.

 

Thanks and regards,

Kai

Nadya | Tech Support Engineer
Telerik team
 answered on 23 Jan 2025
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
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
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
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?