Telerik Forums
UI for WinForms Forum
1 answer
63 views

Hello,

I have a question about the behavior of the Text property in the CellFormatting event in GridView. I understand that GridView uses UI virtualization, and that I need to reset all modified properties for the rest of cells. But how does the Text property behave? I looked through the forum and found this example:

private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.Column.Name == "Description")
            {
                e.CellElement.Text = e.CellElement.Value + " END";
                e.CellElement.Image = Properties.Resources.OutlookViewCalendar;
                e.CellElement.DrawImage = true;
                e.CellElement.TextImageRelation = TextImageRelation.TextBeforeImage;
            }
            else
            { 
                e.CellElement.ResetValue(LightVisualElement.ImageProperty, ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.DrawImageProperty, ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.TextImageRelationProperty, ValueResetFlags.Local);
            }
        }

In this example, all properties are reset except Text. When I tried to reset Text, all cell texts disappeared, except the ones I set manually in CellFormatting. So I think Text has special behavior in CellFormatting, and it's always set from Value at the beginning and it's not affected by UI virtualization and reusing cells. Is that correct?

Also, just to be sure, in all examples I saw the if/else pattern. But functionally, is it the same as if I reset all properties I want to change at the beginning, and then set them later? Or can this have some performance impact? The reason I ask is that I use a switch with more branches, and it would be hard to track what needs to be reset in each one.

Here is my case. And I was also thinking, in my case, is it correct to reset the properties before checking ColumnIndex and RowIndex, or after?

private void rgv_CellFormatting(object sender, CellFormattingEventArgs e)
		{
			e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
			e.CellElement.ResetValue(LightVisualElement.NumberOfColorsProperty, ValueResetFlags.Local);
			e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
			e.CellElement.ResetValue(LightVisualElement.PaddingProperty, ValueResetFlags.Local);
			//e.CellElement.ResetValue(LightVisualElement.TextProperty, ValueResetFlags.Local);

			if ((e.ColumnIndex < 0) || (e.RowIndex < 0))
				return;

			var ed = e.Row.DataBoundItem as TestParEditorItem;
			if (ed == null)
				return;

			bool isSub = ed.IsSubItem;
			bool hasSub = ed.HasSubItems;

			switch (e.Column.Name)
			{
				case "colR":
				case "colFi":
				case "colR2":
				case "colFi2":
					if (isSub)
						e.CellElement.Text = "";
					break;

				case "colMin":
				case "colMax":
					if (hasSub)
						e.CellElement.Text = "";
					break;

				case "colAct":
					e.CellElement.BackColor = SystemColors.ControlLight;
					e.CellElement.NumberOfColors = 1;
					e.CellElement.DrawFill = true;
					break;

				case "colType":
					if (isSub)
					{
						e.CellElement.Text = ed.SubItemName;
						e.CellElement.Padding = new Padding(30, 0, 0, 0);
					}
					else
					{
						e.CellElement.Padding = new Padding(0, 0, 0, 0);
					}
					break;
			}
		}

Thanks.

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Dec 2025
2 answers
79 views

i use VS2022  .net8

i create a new project to try RadTreeView 

ptoject file as attached

but

1. The Text of Form shown on the VS2022 IDE is so small

2. At Run Time  i can not see anything  in the RadTreeView  

can anyone help me

thanks a lot

Top achievements
Rank 1
Iron
Iron
Iron
 answered on 16 Dec 2025
3 answers
96 views
無法載入來源 https://nuget.telerik.com/v3/index.json 的服務索引。
  回應狀態碼未表示成功: 400 (Bad Request)。
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 12 Dec 2025
2 answers
90 views

1.  i install    Telerik UI for WinForm  using Telerik_UI_For_WinForms_2025_4_1111.msi 

2. i can use create Telerik Winform Project and can download License Key to my PC using VS2026

3. But i can not see Telerik Compoment in ToolBox and somethingwrong in the new Telerik Winform Project 

Top achievements
Rank 1
Iron
Iron
Iron
 answered on 12 Dec 2025
1 answer
33 views

J'ai 2 toolwindows.
J'ai une toolwindows 'filtre'. c'est pour la gestion des filtres. Elle se trouve à gauche
J'ai une toolwindows 'Aide'. C'est pour la gérer une aide. Elle se trouve à droite.
Je veux interdire la toolwindows 'filtre' d'être flotante. Elle doit toujours être à gauche.
Comment peut-on faire.
Merci

 

 

Thank's

Laurent.

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Dec 2025
6 answers
215 views

Hi.

 

I'm facing and issue with displaying hierarchical data (self-referencing) in grid when missing parent items in data source - only part of data is displayed.

 

1. Add grid to form

1.var grid = new RadGridView {Dock = DockStyle.Fill};
2.this.Controls.Add(grid);
3.grid.Columns.Add("cName","Name","Name"); //Dummy column displaying Name

 

2. Setup self-referencing

1.var col1 = new GridViewTextBoxColumn("hiddenColumnId", "Id");
2.var col2 = new GridViewTextBoxColumn("hiddenColumnParentId", "ParentId");
3.grid.MasterTemplate.Columns.Add(col1);
4.grid.MasterTemplate.Columns.Add(col2);
5.grid.Columns["hiddenColumnId"].IsVisible = false;
6.grid.Columns["hiddenColumnParentId"].IsVisible = false;
7.grid.Relations.AddSelfReference(grid.MasterTemplate, "hiddenColumnId", "hiddenColumnParentId");

 

3. Create dummy data type

01.class Item
02.{
03.    public Item(int id, string name, int? parentId = null)
04.    {
05.        Id = id;
06.        Name = name;
07.        ParentId = parentId;
08.    }
09. 
10.    public int Id { get; set; }
11.    public string Name { get; set; }
12.    public int? ParentId { get; set; }
13.}

 

4. Add new data source

01.var items = new List<Item>
02.{
03.    new Item(1,"1"),
04.    new Item(2,"1.1",1),
05.    new Item(3,"1.2",1),
06.    new Item(7,"1.2.1",3),
07.    new Item(4,"2"),
08.    new Item(5,"2.1",4),
09.    new Item(6,"2.2",4)
10.};
11.grid.DataSource = items;

 

And as expected a correct tree structure is displayed

1.1
2.-1.1
3.-1.2
4.--1.2.1
5.2
6.-2.1
7.-2.2

 

 

However in my case due to busines logic I have only a subset of data - all except item "1" and "2".

Instead of ex

1.1.1
2.1.2
3.-1.2.1
4.2.1
5.2.2

 

I can see only children of first missing parent item. Although the number of rows is matching correct total number of item to be displayed (5) only part of items are visible (3).

1.1.1
2.1.2
3.-1.2.1

 

 

As a workaroud I can modify data source and remove parent assignement from objects if parent is missing in data source either on data preparation or DataBindingComplete event.

01.private void Grid_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e)
02. {
03.     var grid = sender as RadGridView;
04.      
05.    // Get existing items
06.     var ids = new List<object>();
07.     foreach (var id in grid.Columns["hiddenColumnId"].DistinctValues)
08.     {
09.         ids.Add(id);
10.     }
11. 
12.    // Remove missing parents
13.    foreach (var row in grid.Rows)
14.    {
15.        var parentId = row.Cells["hiddenColumnParentId"].Value;
16.        if (!ids.Contains(parentId))
17.            row.Cells["hiddenColumnParentId"].Value = null;
18.    }
19.}

 

 

However this solution is not suitable, because it is modifying data providing inconsistant state - using that data in code I may falsly assume that the item does not have a parent while it has.

 

Any ideas how to solve this issue?

 

Regargs
Greg

Zander
Top achievements
Rank 2
Iron
 answered on 05 Dec 2025
1 answer
70 views
What do I have to do to keep using CreateEntryFromFile and ZipFile that was once in the Telerik.WinControls?
Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2025
1 answer
63 views

Hi,

I was previously developing with Telerik UI for WinForms 2025 Q3. Recently, I installed the latest version (2025 Q4) using the MSI installer and then manually updated the NuGet packages in my project to complete the upgrade without using the Update Wizard. Everything works fine now.

However, every time I open the project in Visual Studio, I still see the notification:

"You are using an older version of Telerik UI for WinForms for this project. There is a new version available for this computer. Update Now"

Is there a way to disable or hide this notification after manually updating the NuGet packages?

Thanks in advance!

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2025
1 answer
28 views

¡Hi everyone! Is there a possibility to have a RadContexMenu with rounded corners ?
I already change the styles via theme, but when I open the context menu, it has some white square corners behind.

The version I have right now is 2016 SP1

Dinko | Tech Support Engineer
Telerik team
 answered on 25 Nov 2025
1 answer
128 views

Our application doesn't explicitly set a default theme so it defaults to ControlDefault.
One screen uses the MaterialBlueGrey theme, so I wanted the related MessageBoxes to also use that theme.

Per the instructions I used the following code:

RadMessageBox.SetThemeName("MaterialBlueGrey");
RadMessageBox.Show("MESSAGE");
RadMessageBox.SetThemeName("ControlDefault");

The problem is that, although the overall look goes back to the default theme, some elements stay with the MaterialBlueGrey theme. For example: the button height & caption font.

I tried all these with the same result:

RadMessageBox.SetThemeName("");
RadMessageBox.ThemeName = "";
RadMessageBox.ThemeName = "ControlDefault";

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Nov 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)
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
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?