listview

How do I update a WinForms ListView when using VirtualMode=True?

I have an app with a large ListView which is terribly slow so I'm implementing VirtualMode. MSDN does not seem to cover how I would add and delete new items in the middle of the listview. For example, the ListView has 1000 items (representing files on disk) and after the initial population of the ListView (by the RetrieveVirtualItem eve...

WPF: ListBox vs. ListView - how to choose for data binding

I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to search/sort/filter based on user input. The data binding demo (http://msdn.microsoft.com/en-us/library/ms771319.aspx) uses a ListBox with ...

How could I insert a bitmap or other image objects in a CListCtrl in MFC?

I want to list the thumbnails of a set of photos in a listctrl. But the only way to achieve this is to use the setImageList method to bind a image list to the CListCtrl object and insert items like this: InsertItem (int nItem, LPCTSTR lpszitem, int nImage). I also must modify the listctrl's style by ModifyStyle(LVS_TYPEMASK, LVS_ICON) to...

Can I changed an item's size (width and height) in the CListCtrl?

If don't use owner draw? thanks ...

What message or event is raised which I invoke CListCtrl::InsertItem() method?

I was planning to implememt owner-drawn of CListCtrl. I thought that drawing an item is after the item is inserted into the control. So my method is declare a class which is derived from CListCtrl and override its DrawItem() method. The problem is DrawItem is never invoked after inserting an item. Is there anything wrong with my method? ...

ListView with DataPager not working

From everything I've read, it seemed that adding paging to a ListView control should be dead simple, but it's not working for me. After adding the ListView and DataPager controls to the form and wiring them together, I'm getting very odd behavior. The DataPager correctly limits the ListView's page size, but clicking the paging buttons do...

How to change item size and gap between them in Custom Drown CListCtrl

As far as I know ON_WM_MEASUREITEM does not get called in Custom Draw list control. It is only used if control is Owner Drawn. I have found a way to do that, but it is somewhat a HACK and I still can not control gaps between items they are set up somehow automatically. The trick is that you can create CImageList with the unused images of...

Can CListCtrl use OnMeasureItem() method?

I want to change item's height and width according to a slider, but as far as I know, there's no measureitem method as CListBox. How can I fix this? Thank you! ...

List View C# stay selected

Hello , I have a list view that after a double click, a record opens a new form to show the details, but the record in the list view lost the "selection".... How do I know which record was clicked ??? Thanks Maria João ...

What do i use instead of e.Values.add(... for the ListViewEditEventArgs to upload an Image

Hi, i can upload images to the database using linq and the listview control when referancing the e.Values method for the ListViewInsertEventArgs, but there is no such method in the ListViewEditEventArgs, so what can i use to achieve the same results? here is my inserting code: protected void ProjectPhotosList_ItemInserting(object sende...

How to I display a sort arrow in the header of a list view column using C#?

How can I display a sort arrow in the header of the sorted column in a list view which follows the native look of the operating system? ...

Default to last page in a ListView

Using a standard ASP.NET ListView with a LinqDataSource and pagination enabled (with a DataPager), what would be the best way to default to displaying the last page of results? ...

What is the easiest way to display an editable list(like a spreadsheet) in HTML?

We have a requirement to display an editable list in a web page. What would be the easiest way to do that? Farpoint Spread was something I have used to achieve this earlier but it was quite slow when a large number of records were involved and it needed to be coded in VBScript. Besides it wasn't free. I would be looking for a JavaScrip...

ListView FocusedItem Becomes NULL

When the program runs, there is a series of ListView forms. We populated one of them with items (as strings) and we check whether the state of selection has changed. Once it's changed, we grab the text of the selected item using FocusedItem.Text. The first time works just fine but when another selection is made, the selected item returns...

Vertical scroll bar does not appear when the gridview items exceeded the display height

I place the following statements in the second row of my grid in the xaml: <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1"> <ListView Name="listView" Margin="5" Grid.Row="1"> <ListView.View> <GridView AllowsColumnReorder="True"> <GridViewColumn DisplayMember...

WPF - Identifying a scroll event from a horizontal scrollbar?

If you have a ListView with both horizontal and vertical scroll bars. How do you tell which one a scroll event is coming from? ScrollBar.Scroll="xxx" doesn't seem to differentiate. ...

ListView Empty Markup Text

Vista has introduced a new API to display a text in the list view control when it doesn't have any items. As the MSDN library states, I should process the LVN_GETEMPTYMARKUP notification. In the inherited ListView control the WndProc method is overriden: protected override void WndProc(ref Message m) { try { if(m.Msg == 78 /* WM_...

WPF ListView Very Slow Performance - Why? (ElementHost, or Other Reason?)

I have a Windows Forms app, that has a single ElementHost containing a WPF UserControl... in my WPF, I have a VERY simple ListView: <ListView Margin="4" ItemsSource="{Binding Notifications}"> <ListView.View> <GridView> <GridViewColumn Header="FirstName" DisplayMemberBinding="{Binding FirstName}" /> <GridViewColumn H...

Animated "glow" in owner-drawn Progress Bar (ListView/DataGridView)

I've noticed that the bog-standard ProgressBar in .NET 2.0 (Winforms) does show up as the fancy animated glowing bar in Vista; however, using the ProgressBarRenderer (as one generally has to when trying to draw a progress bar in an owner-drawn list view, grid view, or other such control) just gives the visual style without the pretty ani...

c# How can I expand an item within a ListView to occupy multiple lines?

Currently I have a ListView (using the Details View). I would like to implement the behaviour whereby when a user selects a single item (log entry) the log entry expands (from one line to multiple lines) to provide more detailed information about the error that occured. My question is this: Is this possible? If so, is there a good resou...