Telerik Forums
UI for WinForms Forum
1 answer
35 views

Hi!

How do I get the first visible item in RadListView?
And how do I set it up?
Like the TopItem property of a WinForms ListView.

Nadya | Tech Support Engineer
Telerik team
 answered on 09 May 2025
1 answer
38 views

Hey folks!

I need to display a lengthy list of "cards" or perhaps "cells" horizontally.  There will be NO vertical scrolling.  It would be nice if I can scroll horizontally by click+dragging.

Each "card/" will have an Image (thumbnail on the left or top) and some text (on the right or bottom)

 

I've used ListView for multiple UI requirements but I cannot figure out how to get the items to display "all horizontally" - the control wants to fill with Items until the last item that would normally have gone beyond the right side of the control and instead, it wraps to the next row below.  This "wrapping" is what I need to prevent.

I've never used CardView but maybe this is the way I should go?

All thoughts/comments would be appreciated!

Kind regards, 

LK

Nadya | Tech Support Engineer
Telerik team
 answered on 07 May 2025
1 answer
22 views

Hi,

When I add a RadListView to the RadForm, the entire list view has a border. However, as soon as I add rows, the right border below the rows disappears.

What setting can I use to ensure that a full right border is always visible?

 

Kind regards,

Guido

Nadya | Tech Support Engineer
Telerik team
 answered on 17 Apr 2025
2 answers
47 views

Hello everyone :)

I've got a new project that includes a RadListView that I have placed on a WinForm with ViewType = IconsView

I'd like to display a thumbnail along with some HTML text - but I'm struggling getting the data I need from the object being formatted.

Here's my VisualItemFormatting method:

Private Sub rlvScanForms_VisualItemFormatting(sender As Object, e As Telerik.WinControls.UI.ListViewVisualItemEventArgs) Handles rlvScanForms.VisualItemFormatting
Dim myViewElement As RadListViewElement = CType(sender, RadListViewElement)

'               .Item(0) IS WRONG!!!  THiS IS just a place holder for my question to Telerik Forum members :)
If myViewElement.Items(0).Tag IsNot Nothing Then
Dim myScanFormIcon As ScanFormIcon = CType(myViewElement.Items(0).Tag, ScanFormIcon)
Dim myWidth As Integer = myScanFormIcon.IconSize.Width
Dim myHeight As Integer = myScanFormIcon.IconSize.Height
Dim myText As String = myScanFormIcon.DisplayString

If e.VisualItem.Data.Image IsNot Nothing Then
e.VisualItem.Image = e.VisualItem.Data.Image.GetThumbnailImage(myWidth, myHeight, Nothing, IntPtr.Zero)
e.VisualItem.Layout.RightPart.Margin = New Windows.Forms.Padding(2, 0, 0, 0)
End If

If rlvScanForms.ViewType = Telerik.WinControls.UI.ListViewType.IconsView Then
If myViewElement.Items(0).Tag IsNot Nothing Then
e.VisualItem.Text = myText
End If
End If

End If

 

myViewElement.Items(0).Tag holds a class that contains the text I'd like to display along with the correct icon size (these are documents of various sizes so I'd like the icons to have the same width/height ratio.

myViewElement.Items(0).Tag is clearly WRONG...it's there and not Nothing but it's the 0 index of all Items in the RadListView and it's in my code as a place holder so I could build the rest of the UI class.

Does anyone know how I can get the index of the ListViewItem that's being "formatted" by VisualItemFormatting?  Of not the index from the RadListView's Item collection, maybe the actual ListViewItem object itself?

Any help would be appreciated.

Thank

 

Nadya | Tech Support Engineer
Telerik team
 answered on 21 Feb 2025
1 answer
56 views

Below is the code i am using for visualitemcreating, however the layout is not coming out proper, can anyone please help me with this.

When i run the code, i am getting the listview as  which does not include the role and email details that should com in the second row.

Please help, i am unable to find what i am missing here.

Public Class CustomUserVisualItem
    Inherits SimpleListViewVisualItem
    Private Row1Element As LightVisualElement
    Private Row2RoleElement As LightVisualElement
    Private Row2EMailElement As LightVisualElement
    Private stackLayoutMain As StackLayoutPanel
    Private stackLayoutRow2 As StackLayoutPanel
    Protected Overrides Sub CreateChildElements()
        MyBase.CreateChildElements()
        Me.stackLayoutMain = New StackLayoutPanel()
        Me.stackLayoutMain.Orientation = Orientation.Vertical
        Me.stackLayoutMain.EqualChildrenWidth = True
        Me.stackLayoutMain.ShouldHandleMouseInput = False
        Me.stackLayoutMain.NotifyParentOnMouseInput = True
        Me.Children.Add(Me.stackLayoutMain)

        Me.Row1Element = New LightVisualElement()
        Me.Row1Element.StretchHorizontally = True
        Me.Row1Element.MinSize = New Size(120, 0)
        Me.Row1Element.ShouldHandleMouseInput = False
        Me.Row1Element.NotifyParentOnMouseInput = True
        Me.stackLayoutMain.Children.Add(Me.Row1Element)


        Me.stackLayoutRow2 = New StackLayoutPanel()
        Me.stackLayoutRow2.Orientation = Orientation.Horizontal
        Me.stackLayoutRow2.EqualChildrenWidth = True
        Me.stackLayoutRow2.ShouldHandleMouseInput = False
        Me.stackLayoutRow2.NotifyParentOnMouseInput = True
        Me.stackLayoutMain.Children.Add(Me.stackLayoutRow2)

        Me.Row2EMailElement = New LightVisualElement()
        Me.Row2EMailElement.Text = "Email"
        Me.Row2EMailElement.MinSize = New Size(60, 0)
        Me.Row2EMailElement.TextAlignment = ContentAlignment.MiddleLeft
        Me.Row2EMailElement.NotifyParentOnMouseInput = True
        Me.Row2EMailElement.ShouldHandleMouseInput = False
        Me.stackLayoutRow2.Children.Add(Me.Row2EMailElement)

        Me.Row2RoleElement = New LightVisualElement()
        Me.Row2RoleElement.Text = "Role"
        Me.Row2RoleElement.MinSize = New Size(60, 0)
        Me.Row2RoleElement.TextAlignment = ContentAlignment.MiddleRight
        Me.Row2RoleElement.NotifyParentOnMouseInput = True
        Me.Row2RoleElement.ShouldHandleMouseInput = False
        Me.stackLayoutRow2.Children.Add(Me.Row2RoleElement)


    End Sub
    Protected Overrides Sub SynchronizeProperties()
        MyBase.SynchronizeProperties()

        Dim product As UsersList = TryCast(Me.Data.Tag, UsersList)
        Dim color As String = ""

        If product.userstatus = "Active" Then
            color = "Green"
        Else
            color = "Red"
        End If

        Me.Text = ""
        Me.Row1Element.Text = "<html><span style=""color: " & color & "; font-size: 12pt;"">• </span> <span style=""font-size:12pt;"">" & product.firstName & " " & product.lastName & "</span>"
        Me.Row2RoleElement.Text = "<html><span style=""font-size:9pt;"">" & product.role & "</span>"
        Me.Row2EMailElement.Text = "<html><span style=""font-size:9pt;"">" & product.email & "</span>"
    End Sub
    Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
        Get
            Return GetType(SimpleListViewVisualItem)
        End Get
    End Property
End Class

Nadya | Tech Support Engineer
Telerik team
 answered on 04 Sep 2024
1 answer
74 views
Hi team !!!! I want an approach allows me to determine which column was clicked in the RadListView control.
Nadya | Tech Support Engineer
Telerik team
 answered on 30 May 2024
1 answer
258 views

Description:

I recently upgraded my .NET Framework project to .NET Core 8. However, I'm now encountering an issue where the RadListView component is not recognized. I've tried adding the necessary NuGet packages, but the error persists.

The specific error message I'm receiving is:

CS0234: The type or namespace name 'RadListView' does not exist in the namespace 'Telerik WinControls.UI' (are you missing a reference?)

I've attached a screenshot of the error message for your reference.

I'm using the Telerik RadControls for WinForms library, and I've made sure to install the latest version of the NuGet package (Telerik.WinControls.dll). I've also tried adding the following using directives:


using Telerik.WinControls.UI;
using Telerik.WinControls;

But the error persists.

I've searched for similar issues online, but I haven't been able to find a solution that works for me. I'm hoping someone here can help me troubleshoot this problem.

Additional details:

  • I'm using Visual Studio 2022.
  • I'm targeting .NET Core 8.
  • I've tried cleaning and rebuilding the project.

Any help would be greatly appreciated.

Here are some additional things you can include in your forum post:

  • Any relevant code snippets
  • The exact versions of the Telerik RadControls for WinForms library and NuGet package that you're using
  • The steps you took to upgrade your project to .NET Core 8

I hope this helps!

Dinko | Tech Support Engineer
Telerik team
 answered on 24 May 2024
1 answer
101 views

I need to quickly develop an 'updater' application that allows updating one or more software. I would like a look similar to the Adobe updater. What should I choose as a component? A grid? A ListView? Is it possible to have a column in the grid that changes its appearance: switches from a button to a progress bar?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Mar 2024
1 answer
77 views

I can't consistently have the SelectedItemChanged event called when clicking an item with a Listview in IconsView.  If a click is made in empty space, the event is triggered.  

What am I missing?

Attached is a sample app.

 Thanks,

_D

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Dec 2023
1 answer
202 views

Hello, 

I'm currently building a material library tool using Telerik's RadListView. I pretty much got it near exactly what I'm after. However, I'm having some trouble with the last feature, and I'm hoping someone can provide some insight.

What I'd like to do is add an icon to the top left-hand corner of each item that will represent their category.

So far, using the following code and a bit of trickery with HTML markup, my ListView Items currently look like this.

(Written in C++)

    //Create a new ListView Item
    Item = gcnew ListViewDataItem();
    
    //Generate HTML Label
    String^ Label = "<html><strong>" + Name + "</strong><br><span style=\"color:f5f5f5\"><i>" + Latin + "</i></span></html>";
    Item->Text = Label;
    Item->TextAlignment = ContentAlignment::MiddleCenter;
    Item->TextImageRelation = Windows::Forms::TextImageRelation::ImageAboveText;

    //Load the Thumbnail
    String^ thumbnailPath = Path + "\\" + ThumbPath;
    Item->Image = Image::FromFile(thumbnailPath);
    Item->ImageAlignment = ContentAlignment::TopCenter;
   

However, what I'd like to achieve is this:

I was hoping there was a Background Image property for ListViewDataItem. However, that doesn't seem to be the case. Is there a clever trick to achieve this? Or is my only option to create a Custom ListViewDataItem as described here? https://docs.telerik.com/devtools/winforms/controls/listview/custom-items

Thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Nov 2023
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
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
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?