Telerik Forums
UI for WinForms Forum
1 answer
12 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
0 answers
3 views

I had to revert back to 2026.2.520 because of the issues with 026.2.702

The dropdown is broken and I can't release a new build of apps to customers

And now, I found issues with gridview filtering that has worked forever in all previous builds.

After reverting back to 520 these two line work properly again.

So, I'm just writing to let you know that you should look into the next build after 702 to ensure that the 2 lines below function.

Basically, I created a usercontrol and dropped the grid onto the control.

But when I tried to drop the user control onto a form - it threw a error box and wouldn't allow the control to be dropped on the form.

Using trial and error I found that by REMing out 1 or both of the 2 lines below the Usercontrol could be dropped onto the form again.

.MasterTemplate.EnableFiltering = True

.MasterTemplate.DataView.BypassFilter = False

Here is the full routine that I use to clean up the GridView in most instances.

   Friend Sub GridInitializeGridProperties(ByVal oRadGridView As Telerik.WinControls.UI.RadGridView, ByVal Optional EnableFiltering As Boolean = True, ByVal Optional EnableExcelFiltering As Boolean = True)
       Try
           With oRadGridView
               .AutoSizeRows = True
               .TableElement.SearchHighlightColor = Color.Orange
               .Dock = DockStyle.Fill
               .ReadOnly = True
               .AllowAddNewRow = False
               .AllowDeleteRow = False
               .AllowEditRow = False
               .AutoScroll = True
               .EnableFastScrolling = True
               .SelectionMode = GridViewSelectionMode.FullRowSelect
               .AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
               .ShowNoDataText = False
               .EnableAnalytics = False
               .MasterTemplate.BestFitColumns()
               .EnableAlternatingRowColor = True
               .EnableGrouping = False
               .AllowDragToGroup = False
               If EnableFiltering Then
                   .EnableFiltering = True
                   .ShowFilteringRow = True
                   .MasterTemplate.EnableFiltering = True
                   .MasterTemplate.DataView.BypassFilter = False
               End If
               If EnableExcelFiltering Then
                   .ShowHeaderCellButtons = True
               End If
           End With
       Catch ex As Exception
       End Try
   End Sub

 

I'm not concerned about it just now because I reverted back to the previous release - but something more than just the dropdown combos seems to be amiss.

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 20 Jul 2026
1 answer
28 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
133 views

Given the UI below which is bound to BindingLists implementing INotifyChanged interface, I'm seeing some weird behavior.

If I click on  on a top row like Account or Active Contract, the items under it check/uncheck correctly. I'm doing this via the gvGrids_CellEndEdit event like this:

private void gvGrids_CellEndEdit(object sender, GridViewCellEventArgs e)

{

    string formName = e.Row.Cells["FormDescr"].Value.ToString();

    foreach(var item in gridOptionsListDetail.Where(n => n.FormDescr == formName))
    {
        item.Selected = (bool)e.Value;
    }
}

 

The problem occurs when I click on the checkbox to the left of Form. Doing so fires the HeaderCellToggleStateChanged event:

private void gvGrids_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e)

{
    if (e.Column.Name == "Selected")
    {
        ToggleGrids(e.State == Telerik.WinControls.Enumerations.ToggleState.On);

        gvGrids.MasterTemplate.Refresh();

        gvGrids.TableElement.Update(GridUINotifyAction.DataChanged);
    }
}

 

This event will check the Account and Active Contract checkboxes and the ToggleGrids() method will check the Selected property in the underlying BindingList but the subgrid will not refresh unless I scroll down and up again. The weird thing is that If I click the Select All/Deselect All links, which call the same ToggleGrids() method, all works well.

 

What am I missing here?

Thanks

Carl

Nadya | Tech Support Engineer
Telerik team
 answered on 07 May 2026
1 answer
81 views

Hello,
I’m developing an OOABL application using the Telerik GridView component.
How can I add an image to the top-left corner of the grid header?
And how can I add a context menu when the image is clicked?
Thank you for your feedback.

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 16 Apr 2026
1 answer
160 views

I'm using the...

AllowRowReorder = True

...setting in a grid and simply need to know if the user drags and drops a row within the same grid. What event do I need to catch to deal with this please....?

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Apr 2026
2 answers
292 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
50 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
56 views
Hello,

My business application is client-server based.
Client-side: a web client to launch screens with grids.
Server-side: OpenEdge, Bases, Pasoe.

Client-side:
Screen with a binding source: bsUtilisateurChantiers
UtilisateurChantiers table.
Grid: datasource = bsUtilisateurChantier

How do I populate my grid via the BusinessEntity, given that the databases are located on a Linux server?
I have tried the following:
 METHOD PUBLIC VOID InitialisationBE(  ):

        // Run the .p file on PASOE to instantiate the BE and read
        //UTILISATEURCHANTIERS
        gcFiltre= “cod_uti eq ‘” + clsSession:CodUti + “’”.
                
        RUN App/AppBeUtilisateurChantiers.p ON clsSession:hServeur (“INIT”, gcFiltre, INPUT-OUTPUT BeUtilisateurChantiers, INPUT-OUTPUT DATASET dsUtilisateurChantiers).
        RUN App/AppBeUtilisateurChantiers.p ON clsSession:hServeur (“READ”, gcFiltre, INPUT-OUTPUT BeUtilisateurChantiers, INPUT-OUTPUT DATASET dsUtilisateurChantiers).  

but I get this message on the server side, so nothing is being returned:

26/03/13@14:43:25.497+0100] P-050381 T-050421 3 AS-7 AS -- TRACE: Non-PERSISTENT Procedure “App/AppBeUtilisateurChantiers.p” START. (5498)
[26/03/13@14:43:25.497+0100] P-050381 T-050421 1 AS-7 -- (Procedure: “App/AppBeUtilisateurChantiers.p” Line:71) ipcMode= INIT 
[26/03/13@14:43:25.497+0100] P-050381 T-050421 1 AS-7 -- (Procedure: “App/AppBeUtilisateurChantiers.p” Line:71) ipcFiltre= cod_uti eq ‘LTROMBINO’
[26/03/13@14:43:25.498+0100] P-050381 T-050421 1 AS-7 -- (Procedure: “App/AppBeUtilisateurChantiers.p” Line:4294967295) The remote object of class type `Be.beUtilisateurChantiers` cannot be instantiated. (17315)
[26/03/13@14:43:25.498+0100] P-050381 T-050421 3 AS-7 AS -- TRACE: Non-PERSISTENT procedure END ERROR. (8397)
See attachments
        

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Mar 2026
1 answer
51 views

Hi, I have a requirement to have multiple icons in a cell, I have created a custom GridViewDataColumn and a GridDataCellElement

My current implementation has 2 issues, the icons don't appear until you enter or leave a row (in which case only those rows icons get displayed), or when you click on the column (in which case all the visible rows display their icons.

The second issue is that, since I can scroll horizontally, when scrolling right, the cell locations that end up under the location of my icons cells, when you scroll left again, they appear empty, and you need to reload the Datasource or scroll multiple times vertically for them to appear again.

What I'm doing right now is overriding the ArrangeOverride, to locate the icons on the cell with Children[i].Arrange, and creating the icons overriding SetContent and OnCellFormatting and creating LightVisualElements there, calling Children.Clear() at the beginning of the methods.

I'll try to post an example later but has anyone had an issue like this before?

Nadya | Tech Support Engineer
Telerik team
 answered on 10 Mar 2026
Narrow your results
Selected tags
Tags
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
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?