Telerik Forums
UI for WinForms Forum
1 answer
11 views

We set AllowDeleteRow = true, but this doesn't seem to do anything.

What is the default capability for deleting rows/records in the GridView?

Is there a default 'delete'-button or context menu we can show, or do we need to implement it oursleves? The documentation is quite lacking here...

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Mar 2025
1 answer
8 views

We want to switch the gridview to german. 

This article suggests we have to provide our own translations: Localization - UI for WinForms Documentation - Telerik UI for WinForms

We actually would prefer not to do that...

Are there any default translations we can use? If so, how would we integrate them?

If not; where exactly does the provider class reside in our application, and where do we need to set the CurrentProvider?

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Mar 2025
0 answers
11 views

I've been looking at the release notes and i can see that a selection checkbox has been added since we last updated which is great.  I can also see as per the release notes that there is a "New mode for selecting rows only via the selection checkboxes".  Does anyone know how to configure this?

 

Cheers!

Alex
Top achievements
Rank 1
 asked on 07 Mar 2025
1 answer
26 views

I need to add a RadioButton column to my grid and I adapted the code in this demo to do it:

https://docs.telerik.com/devtools/winforms/knowledge-base/creating-a-radradiobuttoncellelement

The difference is I need a single radio button on each row and they need to be mutually exclusive of one another. This part is now working.

Using some sample credit card data, I have 3 challenges that I can't figure out:

1. How can I start the attached project and set the button for the credit card need selected when the form loads?

2. How can I retrieve the selected credit card id value (if any)?

3. I also seem to have a visual bug whereby when I scroll the grid up and down sometimes the button deselects and sometimes it seems to select a second option.

Could you please examine the attached project and let me know what I'm missing?

Thanks

Carl

Carl
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 18 Feb 2025
2 answers
52 views

Objective: get the icon of a file (word,excel,pdf,...) 

In L4G, I use the ExtractAssociatedIconA function to obtain a handle for an icon stored as a resource in a file or an icon stored in the executable file associated with a file.
And I associate it with a button using the SendMessageA function.

Example code:
  DEFINE VARIABLE FILENAME AS CHARACTER NO-UNDO.        
  DEFINE VARIABLE IconInd AS INTEGER NO-UNDO.
  DEFINE VARIABLE hIcon AS INTEGER NO-UNDO.
  DEFINE VARIABLE iOldIcon AS INTEGER NO-UNDO.

  DO WITH FRAME {&FRAME-NAME}: 
    IF NUM-ENTRIES(RowObject.com_cha:SCREEN-VALUE,CHR(9)) > 0 THEN
      DO i = 1 TO NUM-ENTRIES(RowObject.com_cha:SCREEN-VALUE,CHR(9)):
          VIEW hbutton[i] hfillin[i].
          hbutton[i]:SELECTABLE = TRUE.
          ASSIGN DisplayName = ENTRY(i,RowObject.com_cha:SCREEN-VALUE,CHR(9)).
          IF Filename <> "" THEN
          DO:
            RUN ExtractAssociatedIconA(INPUT 0,INPUT-OUTPUT NomFich,INPUT-OUTPUT IconInd,OUTPUT hIcon).
            RUN SendMessageA( hButton[i]:HWND, {&BM_SETIMAGE}, {&IMAGE_ICON}, 0, OUTPUT iOldIcon).
            RUN SendMessageA( hButton[i]:HWND, {&BM_SETIMAGE}, {&IMAGE_ICON}, hIcon, OUTPUT iOldIcon).
          END.

I want to do the same thing with a RadGridView? I've added an ima column as type GridViewImageColumn and in the : 
METHOD PRIVATE VOID GridLien_CellFormatting I'd like to put the image 
RUN SendMessageA( e:CellElement:?????? {&BM_SETIMAGE}, {&IMAGE_ICON}, hIcon, OUTPUT iOldIcon).
Can you help me?
Thank you

Laurent
Top achievements
Rank 1
Iron
Iron
 answered on 13 Feb 2025
1 answer
25 views
Fantastic! But I didn't understand how to do it... Can anyone help me figure out how to create a date only or time only column
Nadya | Tech Support Engineer
Telerik team
 answered on 13 Feb 2025
1 answer
23 views

Hey there!

I've been converting several programs that use 'RadGridView' to'VirtualMode' lately, and yesterday I encountered an issue with one that has template relations. I tried a few approaches, but I can't seem to make it work with the same logic I was using before. However, I did manage to get it working with the 'RowSourceNeeded' event, but it requires me to iterate over the same records more times than I'd like.

Is there another way to achieve this, or is this the only available solution?

 

JP

Nadya | Tech Support Engineer
Telerik team
 answered on 31 Jan 2025
1 answer
19 views

I still haven't found a solution to this problem: https://www.telerik.com/forums/cellvalidating-event-question

asked

1. When user inputs an invalid value for a cell, we can use ErrorText to show an error message in the RowHeaderColumn. Normally, the ErrorText will be cleared after the user corrects the value. Sometimes the user will just press Esc key to cancel the input value, in this case the CellValidating event won't get fired and the ErrorText will remain shown on the RowHeaderColumn. This behavior will make the user feel confused.

answered

1. CellValidating event occurs only when a cell value is changed. In case when Esc is pressed, the value remains the same and no validation is needed. However, you can handle CellEndEdit event in this case and reset the ErrorText property.


Private Sub grdURLs2_UserAddingRow(sender As Object, e As GridViewRowCancelEventArgs) Handles grdURLs2.UserAddingRow
    Try
        If TypeOf e.Rows(0) Is GridViewNewRowInfo AndAlso
        TryCast(e.Rows(0).Cells(0).ColumnInfo, GridViewDataColumn) IsNot Nothing AndAlso
           TryCast(e.Rows(0).Cells(1).ColumnInfo, GridViewDataColumn) IsNot Nothing Then
            If e.Rows(0).Cells(0).Value Is Nothing OrElse
            String.IsNullOrEmpty(Trim(e.Rows(0).Cells(0).Value)) Then
                e.Cancel = True
                DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Empty!"
            ElseIf e.Rows(0).Cells(1).Value Is Nothing OrElse
                String.IsNullOrEmpty(Trim(e.Rows(0).Cells(1).Value)) Then
                e.Cancel = True
                DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Empty!"
            ElseIf e.Rows(0).Cells(1).Value IsNot Nothing Then
                For Each row In grdURLs2.Rows
                    If e.Rows(0).Cells(1).Value = row.Cells(1).Value Then
                        e.Cancel = True
                        DirectCast(e.Rows(0), GridViewNewRowInfo).ErrorText = "Exists!"
                    End If
                Next
            End If
        End If
    Catch ex As Exception
        txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
    End Try
End Sub

Private Sub grdURLs2_CellEndEdit(sender As Object, e As GridViewCellEventArgs) Handles grdURLs2.CellEndEdit
    Try
        If TypeOf e.Row Is GridViewNewRowInfo Then
            DirectCast(e.Row, GridViewNewRowInfo).ErrorText = String.Empty
        End If
    Catch ex As Exception
        txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
    End Try
End Sub

This doesn't work. The CellEndEdit event does not fire.


Nadya | Tech Support Engineer
Telerik team
 answered on 24 Jan 2025
2 answers
26 views
I've tried implement custom filter as per  Permanent editor in a filter cell - Telerik UI for WinForms instruction
but when I run that project drop down list looks too small to hold its content. Please look at attached screenshot. 

Could you advise me how to properly calculate size of dropdown, or in other way make it fit its content. The only way I found is to set 
 this.dropDown.MinSize = new Size(150, 30); 

inside CreateChildElements method. But I'm not sure this is the best way to fix this issue. Could you please advise me how to handle those kinds of size issues?

Ruslan
Top achievements
Rank 1
Iron
 answered on 23 Jan 2025
1 answer
40 views

I use the following code to group and format the group name.

Private Sub grdURLs2_GroupSummaryEvaluate(sender As Object, e As GroupSummaryEvaluationEventArgs) Handles grdURLs2.GroupSummaryEvaluate
    Try
        Dim groupRow As GridViewGroupRowInfo = TryCast(e.Context, GridViewGroupRowInfo)
        If e.SummaryItem.Name = "col1" Then
            If groupRow IsNot Nothing Then
                If e.Value IsNot Nothing Then
                    e.FormatString = e.Value
                Else
                    e.FormatString = ""
                End If
            End If
        End If
    Catch ex As Exception
        txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
    End Try
End Sub

Everything works fine until I leave the group field empty. This code works fine with an empty field, but after restarting the program, it adds records with empty fields not to the same group, but creates a new one. After restarting the program, all fields are in the same group. What am I doing wrong and how can I do it right? Thank you!

P.S.: I figured out why this happens.

Then another question arises. How to check cells for empty values ​​when adding a record and not add records with empty cells (continue editing)? Or replace empty values ​​in cells with significant ones and add?

Nadya | Tech Support Engineer
Telerik team
 answered on 20 Jan 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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
Barcode
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
BarcodeView
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
Krasimir
Top achievements
Rank 3
Iron
Iron
Anas
Top achievements
Rank 1
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Shaimaa
Top achievements
Rank 1
Iron
Joe
Top achievements
Rank 2
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Krasimir
Top achievements
Rank 3
Iron
Iron
Anas
Top achievements
Rank 1
Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
Shaimaa
Top achievements
Rank 1
Iron
Joe
Top achievements
Rank 2
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?