Telerik Forums
UI for WinForms Forum
1 answer
120 views

Hi,

Is there any way to change the background color of a callout control without using a rad theme ?

thx in advance...

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 May 2021
1 answer
183 views
I have a Radgridview in which add new row is enabled and I want to clear all the cells of that adding row area when programmatically I m in the userAddingRow method
Nadya | Tech Support Engineer
Telerik team
 answered on 25 May 2021
3 answers
709 views

Hi

I have found examples showing how to use a RadProgressBarElement in a grid column. I added one to my project and it is working, well almost.

If all my values are positive (ie between 0 and 100), the column shows correctly.

But my values are between -100 and 100. I have set the Minimum property to -100. I see some values with a red zone (which is ok). But shouldn't the green zone only start at 0 (right in the middle)?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 May 2021
1 answer
312 views

Hi, can I use callout control to display additional information, from a datagridview cell instead of a tooltip ?

if yes can u leave a sample please...

thx in advance,

Regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 May 2021
1 answer
114 views
I am using Telerik 2017 R2 in my project .. I want to use image editor in my project. But I believe that Image Editor will only work in 2018 or higher. Any solution to use Image Editor in R2 2017.
Dess | Tech Support Engineer, Principal
Telerik team
 updated answer on 24 May 2021
2 answers
237 views

We are having an odd issue with the RadGrid component on build 2021.2.511.40

We have isolated the issue down to the base component in a sample project and the issue still occurs. I have attached the Sample project.

Steps to reproduce:

Filter the checkbox column to only show unchecked rows
Enter "alfred" as the description filter
Click the checkbox column on the bottom two rows (Sku RT34)
Remove description filter
This will result in the two unrelated records showing as checked. Scrolling or changing sorting will refresh the cell.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 May 2021
0 answers
253 views

RadCallout is like a tooltip with an arrow that can be used to display additional information, warnings, hints, or to highlight relevant data. The appearance of the control can be fully customized to satisfy the needs of your scenarios.

Get familiar with it: https://docs.telerik.com/devtools/winforms/controls/callout/overview 

Dess | Tech Support Engineer, Principal
Telerik team
 updated question on 21 May 2021
1 answer
244 views

I have a problem about the donut chart and the labels that are displayed ..

How do I organize and display labels that are not drawn due to the previously set space, so that they become visible? thank you, I hope someone finds a solution to this problem ..

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 May 2021
1 answer
370 views

Hi !

I'm using a customized listviewitem and i've got this problem, after 2 days on a listviewitem ! :

see attach.

my vertical StackLayoutElement not take availble size.

i want only this part take availble and resize when resize my form


 private class interlocuteurVisualItem : SimpleListViewVisualItem
        {
            private LightVisualElement entite;
            private LightVisualElement localisation_Add;
            private LightVisualElement localisation_Com;
            private LightVisualElement typeInterlocuteur;            

            protected override void CreateChildElements()
            {
                this.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize;

                StackLayoutElement layoutPanel = new StackLayoutElement();
                layoutPanel.Orientation = Orientation.Horizontal;
                layoutPanel.MinSize = new Size(layoutPanel.MinSize.Width, 100);                

                //Entite
                this.entite = new LightVisualElement();
                this.entite.TextWrap = true;
                this.entite.MinSize = new Size(200, 80);
                this.entite.Size = new Size(200, 80);
                this.entite.DrawBorder = true;                    
                this.entite.StretchHorizontally = false;
                this.entite.Alignment = ContentAlignment.MiddleLeft;
                this.entite.TextAlignment = ContentAlignment.MiddleLeft;
                layoutPanel.Children.Add(entite);

                //Localisation
                StackLayoutElement layoutPanel_Localisation = new StackLayoutElement();
                layoutPanel_Localisation.Orientation = Orientation.Vertical;
                layoutPanel_Localisation.AutoSize = true;
                layoutPanel_Localisation.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize;
                layoutPanel_Localisation.Alignment = ContentAlignment.MiddleLeft;
                layoutPanel_Localisation.StretchHorizontally = true;
                layoutPanel_Localisation.StretchVertically = true;


                //Localisation adresse
                this.localisation_Add = new LightVisualElement();               
                this.localisation_Add.Alignment = ContentAlignment.BottomLeft;
                this.localisation_Add.TextAlignment = ContentAlignment.MiddleLeft;
                this.localisation_Add.DrawBorder = true;
                this.localisation_Add.TextWrap = true;
                this.localisation_Add.StretchHorizontally = true;
                layoutPanel_Localisation.Children.Add(localisation_Add);

                //Localisation CP & Commune
                this.localisation_Com = new LightVisualElement();
                this.localisation_Com.Alignment = ContentAlignment.BottomLeft;
                this.localisation_Com.TextAlignment = ContentAlignment.MiddleLeft;
                this.localisation_Com.TextWrap = true;
                this.localisation_Com.DrawBorder = true;
                this.localisation_Com.StretchHorizontally = true;
                layoutPanel_Localisation.Children.Add(localisation_Com);

                layoutPanel.Children.Add(layoutPanel_Localisation);

                // typeInterlocuteur
                this.typeInterlocuteur = new LightVisualElement();
                this.typeInterlocuteur.MinSize = new Size(200, 80);
                this.typeInterlocuteur.Size = new Size(200, 80);
                this.typeInterlocuteur.StretchHorizontally = false;
                this.typeInterlocuteur.TextWrap = true;
                this.typeInterlocuteur.TextAlignment = ContentAlignment.MiddleLeft;
                this.typeInterlocuteur.DrawBorder = true;

                layoutPanel.Children.Add(typeInterlocuteur);

                this.Children.Add(layoutPanel);
                base.CreateChildElements();
            }

            protected override void SynchronizeProperties()
            {
                base.SynchronizeProperties();

                Text = "";
                entite.Text = Convert.ToString(Data["NomEntite"]);
                localisation_Add.Text = $"{Data["Adresse"]}";
                localisation_Com.Text = $"{Data["CodePostal"]} {Data["Commune"]}";
                typeInterlocuteur.Text = Convert.ToString(Data["TypeInterlocuteur"]);
            }


            protected override Type ThemeEffectiveType
            {
                get
                {
                    return typeof(SimpleListViewVisualItem);
                }

            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 May 2021
2 answers
786 views

If you're like me you are not a fan of any "date/time picker" control out there.  The UI around them is often clunky or confusing or both.  The Telerik radDateTimePicker is about as good as it gets though and for anyone who would like them, here are a few useful tips to make using them just a bit easier.

Keyboard Entry: (My applications use a "/" delimiter for your dates - but any delimiter will work) 

Would you like your users to be able to TYPE, "1/1/13"and get "01/01/13" ?  How about "020223" to get "02/02/2023" ?

Telerik UI Winforms has an outstanding Mask called "FreeFormDateTime" and this gets us 95% of the way there but it has its quirks (you can type in "2///34234/" if you want.  It's not a date and the control is great enough to tell you that but the user can still enter it adding to an ugly UI experience.

Here's how I incorporate FreeFormDateTime mask and still get all of the functionality my users require:

DATE_DELIM illustrates the delimiter my application uses - change it to "-" or "." or whatever your application required.  The sample code below references dtpFrom.  This is a radDateTimePicker from the UI Winforms library.

Private ConstDATE_DELIM As String= "/"

 

Private SubFrmDevTest_Load(sender As Object, e AsEventArgs) Handles Me.Load

' I need to capture the keypress, set my masktype and format and clear out the old date value

AddHandlerdtpFrom.DateTimePickerElement.TextBoxElement.KeyPress, AddressOfHandleDateKeyPress

dtpFrom.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime

dtpFrom.Format = DateTimePickerFormat.Custom

dtpFrom.CustomFormat = "MM/dd/yyyy"

dtpFrom.Text = ""

 

End Sub

 

Private SubHandleDateKeyPress(sender As Object, e AsKeyPressEventArgs)

Dimctrl AsRadMaskedEditBoxElement = CType(sender, RadMaskedEditBoxElement)

DimmyChar As Integer= Asc(e.KeyChar)

' If they hit the delimiter key then...what do i do now?

' I know at the end i'll have two delimiters like this:

' mm/dd/yyyy - My application uses a slash but if you want to use something else just change the DATE_DELIM constant.

Select CasemyChar

Case13

' If they hit Enter - selection start and length may still be active. Go shut those off

ctrl.TextBoxItem.SelectionStart = ctrl.TextBoxItem.Text.Length

ctrl.TextBoxItem.SelectionLength = 0

CaseAsc(DATE_DELIM)

' First i need to know where the cursor is - this'll be zero-based

DimCursPos As Integer= ctrl.TextBoxItem.SelectionStart

' I also want to know everythign that's in the textbox

DimCurDateString As String= ctrl.TextBoxItem.Text

 

' Time to make the donuts.

 

' Start by looking at the remainder of the CurDateString

' I do this because for now i dont care if i already have the max number of delimiters

DimDateRemaining As String= Mid(CurDateString, CursPos + 1)

' Now look in that remaining string to see if there's already another delimiter present

DimSearchForThis As String= DATE_DELIM

DimFirstCharacter As Integer= DateRemaining.IndexOf(SearchForThis)

DimNextCharacter As Integer= DateRemaining.IndexOf(SearchForThis, FirstCharacter + 1)

IfFirstCharacter = -1 Then

' I didnt find one...so lets count how many delimiters are already present.

' This will determine whether or not to actually add the delimiter

' Just count the parts

DimParts() As String= CurDateString.Split(DATE_DELIM)

DimNumDelims As Integer= Parts.Count

' if i have 3 parts, then i have a mm/dd and yy - dont let them enter any more.

IfNumDelims = 3 Then

e.Handled = True' Ignore the keypress

End If

Else

' We found one...ignore the keypress and move the cursor

e.Handled = True

' Where do i move the cursor to?

DimMoveCursorPos As Integer= (CursPos + FirstCharacter) + 1

' Move it.

ctrl.TextBoxItem.SelectionStart = MoveCursorPos

' How much do i select?

DimSelectLength As Integer

IfNextCharacter = -1 Then

' Select all of the remaining text

SelectLength = (ctrl.TextBoxItem.Text.Length - MoveCursorPos)

Else

' Only select up to the next delimiter

SelectLength = NextCharacter - (FirstCharacter + 1)

End If

' Select it.

ctrl.TextBoxItem.SelectionLength = SelectLength

End If

End Select

End Sub

That's it.  Your users will experience a very genuine "Free Form" date entry box with a modicum of enforced rules.

 

MouseWheel:

It's SUPER nice to be able to cursor over the DateTimePicker, select the "Month" and start spinning your mouse wheel to scroll up/down the month value.  This also works for Day and Year segments in the date....So if this is so great why mention it?  Well, it's great and its brutal at the same time.   I'll explain:

My applications have forms that do not fit on screen all of the time.  This became extremely apparent when COVID rolled over us and we all found ourselves working from home.  Most of my users don't have screen resolutions as large as they were enjoying at work.  This resulted in me having to ensure my forms would scroll easily for my users without any training.  The mouse-wheel was the answer.  Everyone already used it for this purpose and its support is practically built into Visual Studio. 

The problem is this:  When you are scrolling your WinForm using the mouse wheel...and your cursor happens to flow over the top of a radDateTimePicker control - the form STOPS SCROLLING and the radDateTimePicker snatches focus and IT starts to spin its day/month/year value.   For a Data-Entry page having dates change on you without knowing it = bad.  Having dates change on you to where you have to reload an entire data-structure to fix = bad.  Here's how you fix this:

in your form_Load include this:

dtpFrom.DateTimePickerElement.TextBoxElement.EnableMouseWheel = False

There's really no way to have both worlds here - mouse scrolling dates while also allowing mouse-scrolling forms where its possible your users will scroll over the datetimepickers.  The dates changing inadvertently was the deciding factor.

 

I hope this helps folks :) 

Kindest regards,

Curtis

 

Nadya | Tech Support Engineer
Telerik team
 answered on 19 May 2021
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?