listview

Why do SelectedIndices and SelectedItems not work when ListView is instantiated in unit test?

I'm writing this question in the spirit of answering your own questions, since I found a solution to the problem, but if anyone has a better solution I would gladly listen to it. In the application I am currently working on I am subclassing the ListView control to add some functionality of which some interacts with the ListView Selected...

Scrolling with Multiple ListViews for Android

I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the...

How to get the parent control from an assigned context menu using C#?

I have a few listview controls on a windows form and i've assigned a common contextmenustrip to them all using the properties grid in VS2005. Now when a selection is made from the contextmenu in any listview, is there a way i can get the correct hosting control of the raised menu? ...

WPF: Spilt GridView header into two rows where the bottom row is seperated into two colums

Hello, I´m trying to separate a gridViewColumn into two rows. Im using default style for the listView. Its no problem to separate the column header into two rows, but it seems like the content is placed over the original style with the border etc hidden under my customized gridViewHeader content. The code looks like: <GridViewColumnHead...

How do I edit all rows in an ASP.NET ListView control at the same time?

I would like to know how to put all of my ListView rows into edit mode at once. I am not looking for the traditional behavior of editing each row one at a time. The answer can be in either C# or VB.NET. Also, if possible, any sample code of saving each row's changes after all rows have been edited. ...

How to reclaim image real estate in ListView?

Hi All, Env.: VS 2008, .NET 2.0, WinForms I have a listview in Tile mode. Some items have an associated image. Some don't. The contents (listview items) is often renewed when user clicks some controls. When this happens, it sometimes appears that none of the new items have images. In that case, I would like to get rid of the empty spa...

List of two different Types in C#

Hi, I'm currently having a problem with a ShoppingCart for my customer. He wants to be able to add Text between the CartItems so I was wondering if there is some way to still only have one List. My solution would be to have two lists, one of type IList that gets iterated over when calculating Weight and overall Price of the Cart while ...

Basic question about jquery and .NET

I want to make a page so I can select filters in a "jquery popup", but I don't know how to receive the results. Suppose I have a page with a ListView, and I want to select filters for it (perhaps with multiple selection from a list), so I make a different ASPX and open it using jquery (actually jqModal) via ajax, the user selects the fi...

Getting edit value from ListView

I'm missing something here, but I've stared at it too long to see it. I've got a simple ListView, with the typical Edit/Update/Cancel buttons. I've got the following set up in my EditITemTemplate when the row goes into edit mode: <EditItemTemplate> <asp:Label ID="AccountIdLabel" runat="server" Text='<%#Eval("lan_id")%>' /> <asp:...

Finding the selected item of list view

Hey, I currently have a list view which has several rows of data and I have a contextmenustrip in C# .NET. What I am having problems with is when you click on the menu strip item I want to know which row has been selected. Any help gratly appreciated. ...

c# Retrieve reference to Project Resources (VS2008)

I currently have a listview and I want to add an appropriate icon to each entry. I have created an icon within the Project resources and called it 'errorIcon.ico'. How can I reference this icon/resource and use it within a listview? ...

How to use a DateTime formatted GridViewColumn of WPF ListView?

Hi, I have a small WPF apllication, all column templates are ok an they are textboxes but i couldn't find how to bind a DateTime Column (ie. like a DateTimePicker) to GridViewColumn. thank you... ...

ASP.NET ListView select and highlight line through checkbox

I am trying to get an ASP.NET 3.5 ListView control to select and highlight lines through checkboxes displayed in the first column. If I use an asp:LinkButton instead of a checkbox, the line selection is supported automatically through the LinkButton's property CommandName="Select". How do I do that with the checkbox? And as soon as I man...

Asp.Net ListView how to delete a row without deleting from datasource

Through CommandName="Delete" I try to delete a line from the ListView control but not from the datasource. On Pressing Delete I expect the webpage to reload and show me the updated ListView(with one line deleted). But nothing changes, the ListView will display the same content after pressing Delete. What do I do wrong? : <asp:ListVi...

How to choose a databindable grid control

I recently started working with ASP.NET 3.5, having previously worked with C# and WinForms (mostly .NET 1.1) for about 6 years. My head spins every time I need allow the user to view, add/remove or edit a list of items. This is due to the similarities, and differences, of the following controls DataGrid GridView ListView DataList Ca...

how to display thumbnails in listview like explorer does?

could you please point c++ code example to display videos and images thumbnails in listview? ...

How do I populate a ListView in virtual mode asynchronously?

I'd like to display records from our database in a listview - but retrieves can take a long time. I can use RetrieveVirtualItem to tell me when a new ListViewItem is needed, add a dummy item, and start a retrieve; but what do I do with the record when the database returns it? I can't update the ListView's Items collection while the Lis...

How to add an image to ListView column header?

It should be easy, right? Have a listview, add an imagelist, add images to the imagelist, assign image index to the column you want. But, it doesn't work. Microsoft article states that it is a known problem in .NET 1.1. But has it been fixed since? ...

ComboBox template problems in WPF

I have a listview with a DataTemplate that has a ComboBox. I want the ComboBox to look flat like a label until the user actually wants to change the value. I had the example below working before, but I changed things around a bit, and now it doesn't work anymore and I'm not sure why. The IsMouseOver property does not seem to be working...

user control in a selectable list - best way to do it?

Hello everyone, Working in C# win forms, I'm trying to create a list of items where each item is compromised of an icon and 3 labels in a specific layout. Here's an illustration of it (http://hosting04.imagecross.com/image-hosting-13/3535help.jpg): The user should be able to select a single row, just like in a normal Listview. My fi...