Telerik Forums
UI for WinForms Forum
1 answer
19 views

I built a grid that has three levels as per the code below and I get this UI:


There should be data under the Card and Other/Basic rows but it doesn't show. I've done this successfully with other grids but something seems to be missing in this case.

The top level data looks like this:



The second level looks like this:

and the 3rd layer data looks like this:



private void SetupGrid(RadGridView grid,
                        List<ACHElectronicPayments>? achData)
{
    grid.MasterTemplate.AutoGenerateColumns = true;
    grid.MasterTemplate.ReadOnly = true;

    var achTypeData = achData
        .GroupBy(p => p.Type)
        .Select(group => new
        {
            Type = group.Key,
            AmountCollected = group.Sum(n => n.AmountCollected),
            ReturnAmount = group.Sum(n => n.ReturnAmount),
            Deposit = group.Sum(n => n.Deposit)
        });

        GridViewTemplate template2 = new GridViewTemplate();
        template2.AutoGenerateColumns = true;
        template2.DataSource = achData;
        template2.AllowAddNewRow = false;
        template2.ReadOnly = true;
        template1.Templates.Add(template2);

        GridViewRelation relation2 = new GridViewRelation(template1);
        relation2.ChildTemplate = template2;
        relation2.RelationName = "TypeDCType";
        relation2.ParentColumnNames.Add("Type");
        //relation2.ParentColumnNames.Add("DCType");
        relation2.ChildColumnNames.Add("Type");
        //relation2.ChildColumnNames.Add("DCType");
        grid.Relations.Add(relation2);
    }

    grid.DataSource = achTypeData;

    grid.MasterTemplate.Columns["Type"].Width = 100;
    grid.MasterTemplate.Columns["Type"].HeaderText = "Type";
    grid.MasterTemplate.Columns["Type"].HeaderTextAlignment = ContentAlignment.MiddleLeft;

    grid.MasterTemplate.Columns["AmountCollected"].Width = 100;
    grid.MasterTemplate.Columns["AmountCollected"].HeaderText = "Amount Collected";
    grid.MasterTemplate.Columns["AmountCollected"].HeaderTextAlignment = ContentAlignment.MiddleRight;
    grid.MasterTemplate.Columns["AmountCollected"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Columns["ReturnAmount"].Width = 80;
    grid.MasterTemplate.Columns["ReturnAmount"].HeaderText = "Return Amount";
    grid.MasterTemplate.Columns["ReturnAmount"].HeaderTextAlignment = ContentAlignment.MiddleRight;
    grid.MasterTemplate.Columns["ReturnAmount"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Columns["Deposit"].Width = 90;
    grid.MasterTemplate.Columns["Deposit"].HeaderText = "Deposit";
    grid.MasterTemplate.Columns["Deposit"].HeaderTextAlignment = ContentAlignment.MiddleRight;
    grid.MasterTemplate.Columns["Deposit"].FormatString = "{0:#,##0.00}";



    grid.MasterTemplate.Templates[0].Columns["Type"].IsVisible = false;

    grid.MasterTemplate.Templates[0].Columns["DCType"].Width = 120;
    grid.MasterTemplate.Templates[0].Columns["DCType"].HeaderText = string.Empty;
    grid.MasterTemplate.Templates[0].Columns["DCType"].HeaderTextAlignment = ContentAlignment.MiddleLeft;

    grid.MasterTemplate.Templates[0].Columns["AmountCollected"].Width = 100;
    grid.MasterTemplate.Templates[0].Columns["AmountCollected"].HeaderText = string.Empty;
    grid.MasterTemplate.Templates[0].Columns["AmountCollected"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Templates[0].Columns["ReturnAmount"].Width = 120;
    grid.MasterTemplate.Templates[0].Columns["ReturnAmount"].HeaderText = string.Empty;
    grid.MasterTemplate.Templates[0].Columns["ReturnAmount"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Templates[0].Columns["Deposit"].Width = 120;
    grid.MasterTemplate.Templates[0].Columns["Deposit"].HeaderText = string.Empty;
    grid.MasterTemplate.Templates[0].Columns["Deposit"].FormatString = "{0:#,##0.00}";

    //return;

    grid.MasterTemplate.Templates[0].Templates[0].Columns["Type"].IsVisible = false;

    grid.MasterTemplate.Templates[0].Templates[0].Columns["PaymentType"].Width = 100;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["PaymentType"].HeaderTextAlignment = ContentAlignment.MiddleLeft;

    grid.MasterTemplate.Templates[0].Templates[0].Columns["EpayGLNumber"].Width = 100;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["EpayGLNumber"].HeaderTextAlignment = ContentAlignment.MiddleLeft;

    grid.MasterTemplate.Templates[0].Templates[0].Columns["BankAccount"].Width = 100;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["BankAccount"].HeaderTextAlignment = ContentAlignment.MiddleLeft;

    grid.MasterTemplate.Templates[0].Templates[0].Columns["AmountCollected"].Width = 100;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["AmountCollected"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Templates[0].Templates[0].Columns["ReturnAmount"].Width = 120;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["ReturnAmount"].Width = 120;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["ReturnAmount"].FormatString = "{0:#,##0.00}";

    grid.MasterTemplate.Templates[0].Templates[0].Columns["Deposit"].Width = 120;
    grid.MasterTemplate.Templates[0].Templates[0].Columns["Deposit"].FormatString = "{0:#,##0.00}";
}

What am I missing?

Thanks

Carl

Dinko | Tech Support Engineer
Telerik team
 updated answer on 20 Jul 2026
2 answers
66 views

I have a WinForms-App with .NET 8

I put two Controls in the Form (nothing else, not one line of code)

 private Telerik.WinControls.UI.RadDropDownList radDropDownList1;
 private Telerik.WinControls.UI.RadSpinEditor radSpinEditor1;

The SpinEditor does not Spin, updown-buttons don't work, updown-keys don't work.

The Dropdownlist, does not dropdown when clicking on the down-arrow (it does nothing then)

but it drops down when clicking in the white textbox area.


I changed my version back to 2025.2.520, what I used before, and everything works perfect.
Something happened in this library update. It's unusable as it is now.

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 20 Jul 2026
2 answers
33 views

I did not see a Rad scheduler editing or creating event to check. Which one can I use?

How can I tell if  am creating a new appt or just editing?

--/Greg

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Jul 2026
2 answers
47 views

請幫忙測試 RadPdfViewer 在讀取 PDF 檔案時是否有問題。

作業系統:Windows 11 25H2 26200.8655

請確認ucrtbase.dll版本是否為 10.0.26100.8521。

路徑:C:\Windows\System32\ucrtbase.dll

在此資料夾中找到檔案【鼎新Picture.exe】並雙擊執行。

畫面會打開並載入【NG.pdf】。

測試檔案已附上

視訊連結路徑

 


I tested these four versions of ucrtbase.dll, and only version 10.0.26100.1591 can be enabled.

 

 

 

Kao Hung
Top achievements
Rank 1
Iron
 answered on 02 Jul 2026
2 answers
39 views

Is there a fairly easy way to control the size of the box used to type the message into please? Even better would be to have the ability to add (or turn on) a resize handle so the user can resize the Text box to their desired size. An 'auto resize to fit content' would be another winner if possible. I know these controls are very functional and I suspect most of what is asked here is already possible.

 

Thank you in advance...

 

Simon

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Jun 2026
1 answer
30 views

I've recently had several instances where callingRadMessageBox throws an exception deep inside the Telerik WinForms framework.

This was using version 2026.1.415.48, I have just today updated to 2026.2.520.48.

In both cases the calling code is similar to this

RadMessageBox.SetThemeName ( ScenarioGlobal.G_Theme.ThemeName );
RadMessageBox.Instance.TopMost = true;
RadMessageBox.Show ( null, successText, ScenarioGlobal.G_Form_Title, MessageBoxButtons.OK, Resources.Info_48x48 );

The resulting stack trace in both cases, is as follows

System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.

   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)

   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

   at Telerik.WinControls.UIAutomation.RadControlBaseRootUIAutomationProvider`1.get_BoundingRectangle() in C:\a\1\s\RadControls\RadControlsUI\Accessibility\UIAutomation\RadControlBaseRootUIAutomationProvider.cs:line 50

   at Telerik.WinControls.UIAutomation.Window.RadFormUIAutomationProvider.Form_Resize(Object sender, EventArgs e) in C:\a\1\s\RadControls\RadControlsUI\Accessibility\UIAutomation\Window\RadFormUIAutomationProvider.cs:line 261

   at System.Windows.Forms.Control.OnResize(EventArgs e)

   at System.Windows.Forms.Form.OnResize(EventArgs e)

   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)

   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)

   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)

   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at Telerik.WinControls.UI.RadFormControlBase.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1909

   at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at System.Windows.Forms.Control.set_Size(Size value)

   at System.Windows.Forms.Control.SetClientSizeCore(Int32 x, Int32 y)

   at System.Windows.Forms.Form.SetClientSizeCore(Int32 x, Int32 y)

   at Telerik.WinControls.UI.RadFormControlBase.SetClientSizeCore(Int32 x, Int32 y) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1861

   at Telerik.WinControls.UI.RadFormControlBase.OnThemeChanged() in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1578

   at Telerik.WinControls.ComponentThemableElementTree.set_ThemeName(String value) in C:\a\1\s\RadControls\RadControl\TPF\Control\ComponentThemableElementTree.cs:line 144

   at Telerik.WinControls.UI.RadFormControlBase.set_ThemeName(String value) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 2091

   at Telerik.WinControls.RadMessageBox.SetThemeName(String themeName) in C:\a\1\s\RadControls\RadControlsUI\UIElements\RadMessageBox\RadMessageBox.cs:line 37

Is this somethingmy application is doing / not doing or a "feature" of the RadMessageBox?

Cheers
Toby

 


Nadya | Tech Support Engineer
Telerik team
 answered on 19 Jun 2026
1 answer
29 views

I would to off all scaling in my project and just design for a single type of screen size of 1024 x 768. When I place a control on the form and run it is in correct position, When I go back  in the designer after in has moved outside the form, I have tried  'Telerik.WinControls.RadControl.EnableRadAutoScale' in the program.cs bnut didnt appear to work

Ideas?

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Jun 2026
1 answer
35 views
Make a cell read-only, except when a new row is created.

I want to be able to make a cell in a column read-only when I display the grid.
But if I add a row, I want the cell in that column to no longer be read-only.
Should this be handled in cellbeginEdit?
I read that you could use this line: e:row:isnewrow but it doesn’t compile.

Thank you for your feedback.
Nadya | Tech Support Engineer
Telerik team
 answered on 10 Jun 2026
1 answer
35 views
Please watch the video.
1. https://www.telerik.com/products/winforms/documentation/controls/navigationview/hierarchy-support
    It cannot be dragged or moved at all.
2. Adding forms using an interface presents a host of problems, especially adding submenus.
Nadya | Tech Support Engineer
Telerik team
 answered on 08 Jun 2026
1 answer
127 views
The font was not changed.
Nadya | Tech Support Engineer
Telerik team
 answered on 08 Jun 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
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?