Telerik Forums
UI for WinForms Forum
1 answer
22 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
18 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
32 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
1 answer
30 views

I have a list view to apply the waiting bar.

The list view is bound to the bindingList<T> data structure.

I want to apply the waiting bar to prevent UI from stopping while applying the data I have been querying in DB to the list view.

I think if there is a lot of data, it takes a long time because the work takes longer in the CellFomattting part.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Nov 2023
3 answers
29 views

Hello, 

I'm trying to set up a custom filter for a ListView set in Icon Mode.

Following along with the example provided here: https://docs.telerik.com/devtools/winforms/controls/listview/features/filtering

I've created the following function (no actual filtering functionality has been added yet):

//Apply the filters to the RadListView
bool BrightLife::FilterDatabase(ListViewDataItem^ item)
{

	//Filter by Tree View

	//Filter by Search Bar

	//Filter by Color

	//Filter by Style

	return false;
}

Then, in the constructor of my form, I have the following:

this->LV_Assets->EnableFiltering = true;
this->LV_Assets->ListViewElement->DataView->Filter = FilterDatabase; //<- Problem here

The line which assigns the filter to the RadListView is returning an error in Visual Studio

function "Telerik::WinControls::Data::RadCollectionView<TDataItem>::Filter::set [with TDataItem=Telerik::WinControls::UI::ListViewDataItem ^]" cannot be called with the given argument

I'm not entirely sure what the problem is here and would appreciate any insight to help me get this working. Thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Nov 2023
1 answer
33 views

Hi

There is a List<Class> bound to the ListView, and the data in the list is changed from time to time by the user's. At that time, I want to apply Auto Elipsis, which is shown as... when the letter of the item is longer than the column width with each column width fixed, but I don't know how.

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Nov 2023
2 answers
50 views

Not able to identify Automation ID inside Radlistview each cell.

Please bellow snapshot.

 

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Sep 2023
2 answers
43 views

In my code, i want to add many items in radlistview and then save to sql server table in windows forms app. Here below is my code, but this code isnt working as radlistview does not contain definition for text

The ones i have lebelled in green color. 

Note: This code normally works with normal windows list view control, but i want to use radlistview to implement the same.


    if(ListView1.Items.Count == 0)
    {
        ListViewItem lst = new ListViewItem(txtCustomer.Text);
        lst.SubItems.Add(txtPhone.Text);
        lst.SubItems.Add(txtAddress.Text);
        lst.SubItems.Add(txtLoadNo.Text);
        lst.SubItems.Add(txtDriver.Text);
        lst.SubItems.Add(txtDriverPhone.Text);
        lst.SubItems.Add(txtHauler.Text);
        lst.SubItems.Add(txtPlateNo.Text);
        lst.SubItems.Add(txtProduct.Text);
        lst.SubItems.Add(txtDescription.Text);
        lst.SubItems.Add(txtQty.Text);
        lst.SubItems.Add(txtDate.Text);
        ListView1.Items.Add(lst);


        txtProduct.Text = "";
        txtDescription.Text = "";
        txtQty.Text = "";

        return;
    }

    for(int j = 0; j <= ListView1.Items.Count - 1; j++)
    {
        if(ListView1.Items[j].SubItems[1].Text == txtCustomer.Text)
        {
            ListView1.Items[j].SubItems[1].Text = txtCustomer.Text;
            ListView1.Items[j].SubItems[2].Text = txtPhone.Text;
            ListView1.Items[j].SubItems[3].Text = txtAddress.Text;
            ListView1.Items[j].SubItems[4].Text = txtLoadNo.Text;
            ListView1.Items[j].SubItems[5].Text = txtDriver.Text;
            ListView1.Items[j].SubItems[6].Text = txtDriverPhone.Text;
            ListView1.Items[j].SubItems[7].Text = txtHauler.Text;
            ListView1.Items[j].SubItems[8].Text = txtPlateNo.Text;
            ListView1.Items[j].SubItems[9].Text = txtProduct.Text;
            ListView1.Items[j].SubItems[10].Text = txtDescription.Text;
            ListView1.Items[j].SubItems[11].Text = txtQty.Text;
            ListView1.Items[j].SubItems[12].Text = txtDate.Text;


            txtProduct.Text = "";
            txtDescription.Text = "";
            txtQty.Text = "";

            return;
        }
    }

    ListViewItem lst1 = new ListViewItem(txtCustomer.Text);
    lst1.SubItems.Add(txtPhone.Text);
    lst1.SubItems.Add(txtAddress.Text);
    lst1.SubItems.Add(txtLoadNo.Text);
    lst1.SubItems.Add(txtDriver.Text);
    lst1.SubItems.Add(txtDriverPhone.Text);
    lst1.SubItems.Add(txtHauler.Text);
    lst1.SubItems.Add(txtPlateNo.Text);
    lst1.SubItems.Add(txtProduct.Text);
    lst1.SubItems.Add(txtDescription.Text);
    lst1.SubItems.Add(txtQty.Text);
    lst1.SubItems.Add(txtDate.Text);
    ListView1.Items.Add(lst1);

    txtProduct.Text = "";
    txtDescription.Text = "";
    txtQty.Text = "";
} catch(Exception ex)
{
    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

Nadya | Tech Support Engineer
Telerik team
 answered on 15 Sep 2023
1 answer
36 views

I'm using a split container to display or hide a "comment history" list view element in a details view. One column contains created DateTime values and the other contains string values of comments a user of the application left.

I use the following cell formatting event code to enable text wrapping on my cells.

private void radListView1_CellFormatting(object sender, ListViewCellFormattingEventArgs e)
        {
                e.CellElement.TextWrap = true;
        }

When the form loads everything, the cells look correct. Fully expanded and no clipped text. When I collapse the panel with the splitter buttons and "hide" the list view element and reopen the panel using the splitter buttons then the text is clipped. See attached files for reference of how I want them to look.

I've tried using RadListView.Refresh() in a dozen different event calls, RadListView.ListViewElement.Update(UpdateLayout) in a dozen different event calls, a synchronizationContext.Post() of the Refresh method in a dozen different event calls, and even direct formatting of the UI hierarchy elements Text Wrap property to true to no avail.

I have the following properties set as indicated in various tutorials for the ListView control:

  • AllowArbitraryItemHeight & ...Width = True
  • AutoSizeColumnsMode = Fill
  • Dock = Fill
  • ViewType = DetailsView

I have the following properties set for the parent SplitPanel control:

  • Dock = Fill

For other relevant properties, I can confirm on a case by case basis since I'm not sure what I'm missing in my problem. Any guidance or advice is very appreciated.

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Jun 2023
9 answers
506 views

I have a listview with 5 columns, I want the 4th column of each row of the list box to have a backcolor which is specified by the user, (it's a visual representation of what they will see later in the program)  I created a ListViewDataItem to capture all the info to be displayed in the listview, but I can't seem to get it to change the backcolor of a specific column.

 

please advise.

 

thanks

Jason

Henri
Top achievements
Rank 1
Iron
 answered on 16 May 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
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
RichTextEditor
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?