Telerik Forums
UI for WinForms Forum
0 answers
4 views

Hi,

in datagridview I have set AllowRowReorder to True and works well.

But I want to copy row (not move) when I hold Ctrl key, it is possible?

Radek
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 08 Aug 2025
0 answers
3 views

Hello,

I want to add drawstring (watermark) to datagridview for some help information (for example: "double click to add new item" etc)

Can you help me?

 

 

Radek
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 08 Aug 2025
1 answer
8 views

Hi

I have a RadGridView with a  object-relational 3-tier-hierarchy where the datasource is a DataSet.

In a situation where my application updates an item of the first sublayer of the dataset:

each.ItemArray = vorgang.ItemArray;

the whole application gets into a deadlock.

Here is the call stack:

 	Anwendung.dll!Xxx.Yyy.Anwendung.View.GermanRadGridLocalizationProvider.GetLocalizedString(string id) Line 843	C#
>	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GroupPanelElement.UpdateView()	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GroupPanelElement.ProcessEvent(Telerik.WinControls.UI.GridViewEvent eventData)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(Telerik.WinControls.UI.GridViewEvent gridEvent, Telerik.WinControls.UI.PriorityWeakReferenceList list, Telerik.WinControls.UI.GridEventProcessMode processMode)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(Telerik.WinControls.UI.GridViewEvent gridEvent)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(Telerik.WinControls.UI.GridViewEvent gridEvent)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(Telerik.WinControls.UI.GridViewEvent gridEvent)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(Telerik.WinControls.UI.GridViewTemplate template, Telerik.WinControls.UI.GridViewEvent eventData, bool postUI)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewObjectRelationalDataProvider.DispatchDataViewChangedEvent(Telerik.WinControls.UI.DataViewChangedEventArgs args)	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewObjectRelationalDataProvider.Refresh()	Unknown
 	Telerik.WinControls.GridView.dll!Telerik.WinControls.UI.GridViewObjectRelationalDataProvider.bindableChildren_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.DataView.OnListChanged(System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.DataView.IndexListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.DataView.IndexListChangedInternal(System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.DataViewListener.IndexListChanged(System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.Index.OnListChanged.AnonymousMethod__88_0(System.Data.DataViewListener listener, System.ComponentModel.ListChangedEventArgs args, bool arg2, bool arg3)	Unknown
 	System.Data.dll!System.Data.Listeners<System.__Canon>.Notify<System.__Canon, bool, bool>(System.__Canon arg1, bool arg2, bool arg3, System.Data.Listeners<System.__Canon>.Action<System.__Canon, System.__Canon, bool, bool> action)	Unknown
 	System.Data.dll!System.Data.Index.OnListChanged(System.ComponentModel.ListChangedEventArgs e)	Unknown
 	System.Data.dll!System.Data.Index.RecordStateChanged(int oldRecord, System.Data.DataViewRowState oldOldState, System.Data.DataViewRowState oldNewState, int newRecord, System.Data.DataViewRowState newOldState, System.Data.DataViewRowState newNewState)	Unknown
 	System.Data.dll!System.Data.DataTable.RecordStateChanged(int record1, System.Data.DataViewRowState oldState1, System.Data.DataViewRowState newState1, int record2, System.Data.DataViewRowState oldState2, System.Data.DataViewRowState newState2)	Unknown
 	System.Data.dll!System.Data.DataTable.SetNewRecordWorker(System.Data.DataRow row, int proposedRecord, System.Data.DataRowAction action, bool isInMerge, bool suppressEnsurePropertyChanged, int position, bool fireEvent, out System.Exception deferredException)	Unknown
 	System.Data.dll!System.Data.DataRow.EndEdit()	Unknown
 	System.Data.dll!System.Data.DataRow.ItemArray.set(object[] value)	Unknown

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Aug 2025
4 answers
118 views

Hello,

we have an application using Telerik version 2021.3.1123.40. It is not the first time these errors were reportet, but I have no methode to reproduce it at the moment. The chain of Events for both errors is, that RadGridView.FilterChanged-Event is called, from there we call our method "UpdateProzessschritte" (UpdateProcessSteps), which does a BeginUpdate and EndUpdate of the grid. When EndUpdate is called, the 2 errors orccured under certain, unknown conditions.

  1. ERROR|TBM_HAProzessPlugin.MainForm|1|(null)| In Modul TBM|DNA - Digitaler Netzanschluss ist ein Fehler aufgetreten. System.InvalidOperationException: Die Auflistung wurde geändert. Der Enumerationsvorgang kann möglicherweise nicht ausgeführt werden.
       bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       bei System.Collections.Generic.List`1.Enumerator.MoveNextRare()
       bei System.Collections.Generic.List`1.Enumerator.MoveNext()
       bei Telerik.WinControls.UI.DataGroup.<GetEnumerator>d__7.MoveNext()
       bei Telerik.WinControls.UI.GridViewGroupRowInfo.get_ChildRows()
       bei Telerik.WinControls.UI.GridViewRowInfo.HasChildRows()
       bei Telerik.WinControls.UI.GridTraverser.CanStepInHierarchy()
       bei Telerik.WinControls.UI.GridTraverser.StepInHierarchy()
       bei Telerik.WinControls.UI.GridTraverser.MoveNextCore()
       bei Telerik.WinControls.UI.GridTraverser.MoveNext()
       bei Telerik.WinControls.UI.GridTraverser.GoToRow(GridViewRowInfo row)
       bei Telerik.WinControls.UI.BaseGridNavigator.ProcessEventCore(GridViewEvent eventData)
       bei Telerik.WinControls.UI.BaseGridNavigator.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
       bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
       bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
       bei Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
       bei Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
       bei Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
       bei Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.GridViewTemplate.EndUpdate(Boolean notify, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.MasterGridViewTemplate.EndUpdate(Boolean notify, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.GridViewTemplate.EndUpdate()
       bei Telerik.WinControls.UI.RadGridView.EndUpdate()
       bei TBM_HAProzessPlugin.MainForm.UpdateProzessschritte(RadGridView radGridView, RadDiagram radDiagram, Dictionary`2 prozessDauerListe, List`1 schritte) in C:\Program Files (x86)\Jenkins\jobs\TBM_DNA_Digitaler_Netzanschluss_WP\workspace\TBM_HAProzessPlugin\src\Forms\MainForm.cs:Zeile 510.
       bei TBM_HAProzessPlugin.MainForm.rgvHAAkten_FilterChanged(Object sender, GridViewCollectionChangedEventArgs e) in C:\Program Files (x86)\Jenkins\jobs\TBM_DNA_Digitaler_Netzanschluss_WP\workspace\TBM_HAProzessPlugin\src\Forms\MainForm.cs:Zeile 442.

    [Translation]: Collection was modified; enumeration operation may not execute


  2. ERROR|TBM_HAProzessPlugin.MainForm|1|(null)| In Modul TBM|DNA - Digitaler Netzanschluss ist ein Fehler aufgetreten. System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
       bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       bei System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
       bei Telerik.WinControls.Data.GroupBuilder`1.Perform(IReadOnlyCollection`1 items, Int32 level, Group`1 parent)
       bei Telerik.WinControls.Data.GroupBuilder`1.get_Groups()
       bei Telerik.WinControls.Data.RadDataView`1.get_Groups()
       bei Telerik.WinControls.UI.GridViewInfo.Refresh()
       bei Telerik.WinControls.UI.GridViewInfo.get_ChildRows()
       bei Telerik.WinControls.UI.GridViewTemplate.get_ChildRows()
       bei Telerik.WinControls.UI.ViewInfoTraverser.SetCollectionForStage(Boolean initializeCollection)
       bei Telerik.WinControls.UI.ViewInfoTraverser.ChangeCollectionForward()
       bei Telerik.WinControls.UI.ViewInfoTraverser.MoveNextCore()
       bei Telerik.WinControls.UI.ViewInfoTraverser.MoveNext()
       bei Telerik.WinControls.UI.GridTraverser.MoveNextCore()
       bei Telerik.WinControls.UI.GridTraverser.MoveNext()
       bei Telerik.WinControls.UI.GridTraverser.GoToRow(GridViewRowInfo row)
       bei Telerik.WinControls.UI.BaseGridNavigator.ProcessEventCore(GridViewEvent eventData)
       bei Telerik.WinControls.UI.BaseGridNavigator.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
       bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
       bei Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
       bei Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
       bei Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
       bei Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
       bei Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
       bei Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.GridViewTemplate.EndUpdate(Boolean notify, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.MasterGridViewTemplate.EndUpdate(Boolean notify, DataViewChangedEventArgs e)
       bei Telerik.WinControls.UI.GridViewTemplate.EndUpdate()
       bei Telerik.WinControls.UI.RadGridView.EndUpdate()
       bei TBM_HAProzessPlugin.MainForm.UpdateProzessschritte(RadGridView radGridView, RadDiagram radDiagram, Dictionary`2 prozessDauerListe, List`1 schritte) in C:\Program Files (x86)\Jenkins\jobs\TBM_DNA_Digitaler_Netzanschluss_WP\workspace\TBM_HAProzessPlugin\src\Forms\MainForm.cs:Zeile 510.
       bei TBM_HAProzessPlugin.MainForm.rgvHAAkten_FilterChanged(Object sender, GridViewCollectionChangedEventArgs e) in C:\Program Files (x86)\Jenkins\jobs\TBM_DNA_Digitaler_Netzanschluss_WP\workspace\TBM_HAProzessPlugin\src\Forms\MainForm.cs:Zeile 442.

    [Translation]: Item with Same Key has already been added

 

Do you have any ideas which causes could lead to this exceptions and how to fix it? Or is this a known problem which was already fixed in later versions?

Stephan
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 01 Aug 2025
6 answers
133 views

i have noticed that if you click on the + icon of the pdfnavigator it doesn't work. outside the + icon it works.
is this only the case with me ?

 

andre

Kao Hung
Top achievements
Rank 1
Iron
 updated answer on 01 Aug 2025
2 answers
19 views

Hello.

I am developing a form that has a radgrid with hierarchy and in some instances, the parent row makes changes to the child rows and vice versa.
In my case, I have the functionalities below (Among others):

  1. Both the parent and child rows have a "Check" column.
  2. The relation between the 2 is done through an "Id" column which in my DataSource, is a Guid (The column in both templates is a textbox).
  3. Every time a row is checked (Parent or child), the background changes color.
  4. Every time I check a parent row, the corresponding child rows are also checked (Which then change color).
    Same happens if I uncheck the parent row which then unchecks the corresponding child rows and resets the background color.
    This behavior is managed in the CellValueChanged event of the RadGridView.
    Checking and unchecking the child rows according to the parent, is being done directly in the DataSource which in my case is a DataTable. But the same behavior happens if I edit the grid rows directly.
  5. In the parent template, the Check column has the property EnableHeaderCheckBox set to true.
  6. The color rule is managed by a ExpressionFormattingObject added to the ConditionalFormattingObjectList property of the Check column. I also tried to set up the color rules in the Formating events but the problem I will explain below persists. Still, the color is not the only problem.

My problem here is that everything works correctly if I check and uncheck the parent rows individually. Whether they expanded or not. Depending on the check action in the parent row, the child rows update visually both in their "Check" state and in the color rule.



However, if I check/uncheck all the parent columns from the header check box, the child rows do not update visually unless I close the parent row and expand it again or if I click on all rows/scroll down or up to force them to update.
Like in this print for example. The first parent row was expanded when I checked the header check box. It was suppose to check the child rows and update the color. They are checked internally in the datasource.



There are also some issues with the header check in the child rows. In this case, I do not have the EnableHeaderCheckBox = true in the GridViewTemplate but the problem is similar. Checking all the child rows of a certain parent row through the header check, updates the value on the "Chk" column but does not update it visually with the color.

There is also a problem where in some instances if I check all the parent rows through the header check box, their color does not update.
This happens regardless of the parent rows being expanded or not.



I have to click on each one or scroll or expand them to force the visual update.
The problem seems to be related to the actual visual update. I tried multiple things to for the update but none helped. Also tried forcing the rows to expand if they were collapsed not none helped.

This is all I tried.


On all the examples, I checked the data in the datasource and everything is updated correctly. It is just the visuals that are not updating automatically.

To help understand the problem, I attached a little example with a solution similar to what I have, where this issue can be replicated.
I am using Telerik Winforms V2024.4.1113.462.

Thank you in advance for any answer.
João Carvalho

João
Top achievements
Rank 1
Iron
 updated answer on 31 Jul 2025
3 answers
16 views

Hello,

I have a issue with print datagridview by a larger number of columns.

In first case (WratText = false) I cannot see all text (see image)

In the second case (WrapText = true) is row height too small and again I cannot see whole text.

Both case it has set AutoSizeRows = true;

In both cases I don't see the entire date

 Can you help me?

Thank you

Radek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 24 Jul 2025
3 answers
18 views

Hello,

I want to choose column by checkboxes, something like that:

I

It is possible?

Thank you for your answer

Radek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 18 Jul 2025
1 answer
17 views

On the gridview when a user enters a filter value, I would like for the background color of that filter to change to a different color (only for the column or columns where a filter has been entered) so that users can quickly see where they entered a filter value.

Currently, if the grid has many columns the user will enter a value (sometimes forget that they did that) and wonder why they have a filtered grid.  I know that sounds crazy but end users do that!  So, I'd like the Filter Cell Backcolor to be a different color so that it's Obvious that - that particular column has a filter applied to it.

Below, I show the code I'm using in the GridData_ViewCellFormatting event.  But the problem is - is that it changes the color for the entire filtering row (across all columns)... whereas I want the back color of the "Filter Cell" to change only for that particular column or columns where a filter has been applied.

It would be greatly appreciated is someone has the answer to solving this 'problem'.

Dim filterDescriptors = GridData.FilterDescriptors
If TypeOf e.CellElement Is Telerik.WinControls.UI.GridFilterCellElement Then
    DirectCast(e.CellElement.RowInfo, Telerik.WinControls.UI.GridViewFilteringRowInfo).Height = 28
    e.CellElement.DrawFill = True
    e.CellElement.NumberOfColors = 1
    e.CellElement.BackColor = Color.Beige
    e.CellElement.Font = New Font("Verdana", 10)
    For Each filterDescriptor In filterDescriptors
        Dim propertyName = filterDescriptor.PropertyName
        Dim filterOperator = filterDescriptor.Operator
        Dim expression = filterDescriptor.Expression
        Dim filterValue = filterDescriptor.Value
        If filterValue IsNot Nothing Then
            'If e.CellElement.Text = propertyName Then
            e.CellElement.BackColor = Color.LightGreen
            Exit Sub
            'End If
            'e.CellElement.BackColor = Color.Pink
        End If
Nadya | Tech Support Engineer
Telerik team
 answered on 15 Jul 2025
1 answer
11 views

Hello,

I created Barcode Column in RadGridView according this article: https://docs.telerik.com/devtools/winforms/knowledge-base/barcode-column-in-gridview

And now I do not know how I can print gridview with Barcode Column.

Can you help me? Thank you

 

Nadya | Tech Support Engineer
Telerik team
 answered on 15 Jul 2025
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?