Telerik Forums
UI for WinForms Forum
1 answer
97 views

If I have to dynamically add data to the Treemap, I'm usually clearing the items at the start of this process. Then, when I add new items in the tree map remains totally clear on the 2nd time data is loaded. The first time is fine.

I've been looking for a Refresh method but this does not assist at all.

My current codes goes something like...

With Me.treList
    .Items.Clear()

    If rec.RecordCount > 0 Then
        Do Until rec.EOF
            .Items.Add(rec("Department").ToString, CDbl(rec("TotalDepartmentStock")))
            rec.movenext
        Loop
    End If

    .Refresh()
End With

Thank you in advance.

Simon

Simon
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 15 Apr 2026
1 answer
145 views

Hello everyone,
I'm encountering the following issues when using RadDock 2025 Q2. Any solutions?
1. When the main form changes, the layout doesn't auto-refresh, leaving blank space or causing docking windows to be overlapped.
2. When closing windows, the layout doesn't auto-refresh, leaving blank areas.
3. Splitter bars sometimes cannot be dragged.
4. All windows inherit from DocumentWindow (or ToolWindow) and implement IRequireServices. Window creation and construction use DI injection.

The management code used and the demo GIF are attached in the package.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Apr 2026
2 answers
367 views

I have 2 grids with drag and drop capability, one of them is just a simple grid with 2 columns, the other grid is a grid with 3 Hierarchical Templates that have 3 associated BindingSources.

How can I, when dragging and dropping from the simple grid to the hierarchical grid, determine which Template I am dragging the row to and add it to that Template/BindingSources?

I used exactly the example code you have here (https://docs.telerik.com/devtools/winforms/controls/gridview/rows/drag-and-drop), and indeed everything works.

I just wanted to understand if it's possible to know which Template the row is being dragged to and add it exactly to that Template.

F3M
Top achievements
Rank 2
Iron
Iron
 answered on 13 Apr 2026
1 answer
95 views

Hi,

I have a requirement to show a column congtaining waiting bar dot rings in a grid view.

I have the currentcode which defines the custom cell and also the custom column

//////////////////////////////////////
// custom cell
//////////////////////////////////////

public class WaitingDotsRingCellElement : GridDataCellElement
{
    private RadWaitingBarElement waitingElement;
    private DotsRingWaitingBarIndicatorElement ringElement;


    public WaitingDotsRingCellElement ( GridViewColumn column, GridRowElement row )
        : base ( column, row )
    {
    }


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

        ringElement = new DotsRingWaitingBarIndicatorElement ();

        ringElement.DotRadius = 4;
        ringElement.LastDotRadius = 1;
        ringElement.Radius = 10;
        ringElement.ElementCount = 8;
        ringElement.NumberOfColors = 4;
        ringElement.ElementColor = Color.Red;

        waitingElement = new RadWaitingBarElement ();
        waitingElement.WaitingIndicators.Clear ();
        waitingElement.WaitingSpeed = 40;
        waitingElement.WaitingStyle = WaitingBarStyles.DotsRing;
        waitingElement.WaitingIndicators.Add (ringElement );

        Children.Add ( waitingElement );
    }


    protected override void SetContentCore ( object value )
    {
        if ( Value != null && Value != DBNull.Value )
        {
            if ( Convert.ToInt32 ( Value ) == 0 )
            {
                waitingElement.StopWaiting ();
            }
            else if ( Convert.ToInt32 ( Value ) == 1 )
            {
                waitingElement.StartWaiting ();
            }

        }
    }


    public override bool IsCompatible ( GridViewColumn data, object context )
    {
        return data is WaitingDotsRingColumn && context is GridDataRowElement;
    }


    protected override Type ThemeEffectiveType
    {
        get
        {
            // Ensures the cell inherits grid cell styling
            return typeof ( GridDataCellElement );
        }
    }
} // WaitingDotsRingCellElement


//////////////////////////////////////
// custom column
//////////////////////////////////////


public class WaitingDotsRingColumn : GridViewDataColumn
{
    public WaitingDotsRingColumn(string fileName ) : base(fileName)
    {
    }


    public override Type GetCellType ( GridViewRowInfo row )
    {
        if ( row is GridViewDataRowInfo )
        {
            return typeof ( WaitingDotsRingCellElement );
        }
        return base.GetCellType ( row );
    }
} // WaitingDotsRingColumn

My issue is that the properties "radius" and "element count" are not being set correctly, however other properties such as element color are being set correctly.

My grid view row height is being set to 32 via gridView.TableElement.RowHeight

In addition, how do i get rid of the "button" effect appearing in the cell background?

Kind regards
Toby

 
Nadya | Tech Support Engineer
Telerik team
 answered on 13 Apr 2026
1 answer
80 views

I have a hierarchical menu of RadMenuItems

Item

   SubItem

       SubSubItem

If I select SubSubItem, is there any way via recursion I could iterate back up the tree to the top Item menu?

I saw a post from 2013 that suggested storing references to the preceding menu item in the Tag property but I'm wondering if there is a better way now to do this?

Thanks

Carl

 

Nadya | Tech Support Engineer
Telerik team
 answered on 03 Apr 2026
1 answer
104 views

1. if i set  MultiSelect = false;     

   after user click

   how can i get current row and it's data

 2. if i set  MultiSelect = true;     

   after user select many rows 

   how can i get these rows and it's data

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Mar 2026
1 answer
93 views

I use a RadDropDownList, I want to give the user the ability to search the items in the drop down so I use the default DropDownStyle = DropDown with AutoCompleteMode = SuggestAppend.

However, I want to ensure that the user selects a valid item from the list and doesn't leave random text. So I created the extension method EnsureValidSelection() below that remembers the original value, and on validation resets it to that original value if no valid value is now selected.

This works well when the ValueMember is an int. But when it's a string, it ignores the code that sets the SelectedValue.

public static void EnsureValidSelection(this RadDropDownList combo)
{
    object originalValue = null;
    combo.Enter += DropDownEnter;
    combo.SelectedValueChanged += DropDownSelectedValueChanged;
    combo.Validated += DropDownValidated;
    return;

    void DropDownEnter(object sender, EventArgs e)
    {
        originalValue = ((RadDropDownList)sender).SelectedValue;
    }

    void DropDownSelectedValueChanged(object sender, EventArgs e)
    {
        if (originalValue != null && combo.SelectedValue != null)
            originalValue = combo.SelectedValue;
    }

    void DropDownValidated(object sender, EventArgs e)
    {
        if (combo.SelectedValue == null)
            combo.SelectedValue = originalValue;
        originalValue = null;
    }
}

Martin Ivanov
Telerik team
 answered on 24 Mar 2026
1 answer
149 views

Hi there, I have three panels and I want to hide the centre panel - how do I do this please?

I don't want to just make it zero width - I would like to hide it totally (including the sizing handle) until I need it.

Here is what I have tried thus far...

Me.mSplitContainer.SplitPanels("panFilter").SplitPanelElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed

Thank you in advance.

Simon

Nadya | Tech Support Engineer
Telerik team
 answered on 23 Mar 2026
1 answer
137 views

I've got a RadRibbonForm as my main form.  I'd like my users to be able to resize this form - and they can but the border is a single pixel making it nearly impossible to position your mouse over it in order to drag-and-resize.

I've tried creating my own Telerik.WinControls.UI.FormControlBehavior class called "CustomFormControlBehavior" that Inherits Telerik.WinControls.UI.FormControlBehavior with BorderWidth property that looks like this:

Public Overrides ReadOnly Property BorderWidth As Padding
Get
Return New Padding(10)
End Get
End Property

and in my main form's constructor, following InitializeComponent() I've added the following:

        Dim Behavior As Telerik.WinControls.UI.FormControlBehavior = New CARMSCustomRibbonFormBehavior()
        Me.FormBehavior = Behavior

The above code will not execute!

Can you help me resolve how to change the BorderWidth of my RadRibbonForm?  How close was I to the solution!? :)

Kindest regards, all!

-C

 

 

Stenly
Telerik team
 answered on 19 Mar 2026
1 answer
115 views

I'm using the DockWindow on an MDI WinForms app. The Customer Search form is the first one to open.

When I open another form I'd like it to appear to the right of Customer Search. For some reason its appearing to the left.

The code below shows how I open it. Setting the MDIParent adds it to the DocumentWindows collection.

How can I get the Account form to appear to the right of Customer Search. (And any forms opened after that also must appear to the right.)

FormAccount? form = null;
foreach (HostWindow window in this.dock.DockWindows.DocumentWindows)
	if (window.MdiChild is FormAccount)
	{
		FormAccount formCandidate = (FormAccount)window.MdiChild;
		if (formCandidate.BranchId == GlobalServices.Instance.ActiveBranchID && formCandidate.AccountId == (accountId == null ? GlobalServices.Instance.ActiveAccount.NamesId : accountId))
			form = formCandidate;
	}

if (form == null)
{
	form = accountId == null ? new FormAccount(GlobalServices.Instance) : new FormAccount(GlobalServices.Instance, accountId);
	form.AccountId = GlobalServices.Instance.ActiveAccountID;
	form.MdiParent = this;
	form.SetImageAndTitle(ETitleFormat.Account);
	form.AccountFormType = EAccountFormType.Account;
	form.ControlBox = false;
	form.LaunchedFromIPC = launchedFromIPC;
	if (sender == null)
		this.WindowState = FormWindowState.Maximized;
	form.Show();
}

HostWindow hw = App.MainForm.dock.GetHostWindow(form);
if (hw != null)
	dock.ActivateWindow(hw);

Thanks

Carl

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Mar 2026
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
ScrollablePanel
DataEntry
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
SmartPasteButton
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?