listview

WPF: How to freeze a ListView header row so that it won't scroll off the screen

Hi, I am new to WPF development, I have a ListView and I want to freeze the header row so that it won't scroll off the screen when the user scrolls the list. The xaml code, I have inherited, looks something like this: <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <DockPanel> <forms:Bindable...

C# Implementing Auto-Scroll in a ListView while Drag & Dropping

Hi, How do I implement Auto-Scrolling (e.g. the ListView scrolls when you near the top or bottom) in a Winforms ListView? I've hunted around on google with little luck. I can't believe this doesn't work out of the box! Thanks in advance Dave ...

Add programmatically ListViewItem to Listview in WPF

How it can be done in C#? ...

Listview navigation behaviour in an xbap versus a standalone app

Hello, I have an wpf application which contains a listview. When the application runs as a standalone I can navigate through the list with the arrow up and the arrow down keys on the keyboard. When the application is deployed as an XBAP and runs in a browser window I can do this too but when I for example reach the top element and press...

How to move data from one listview to another in C#?

How to move data from one listview to another using c# ...

ListView with LVS_OWNERDATA flag

Hello I want to make a CListView that will read his rows from e remote server using socket. The rows may be more than a million that's why i need to read rows only when I need them and may be read them in a groups (with more that 1 row per request). I also need to support sorting by rows. May be I have to use List Control with LVS_OWNE...

Can I Number a GroupTemplate or ItemTemplate?

I would like to use a GroupTemplate to separate a list of items into groups. However, I need each Group to be numbered sequentially so I can link to them and implement some JS paging. I'm binding to an IEnumerable Here's some pseudo code. I would like the output to look like this: <a href="#group1">Go to Group 1<a> <a href="#group2">...

Can I define Default Sort order in LinQ

If I have a nested ListView, and I'm calling a related table in LinQ, how do I sort it, without resorting to the ItemDataBound event of the parent? Pseudo Code (UPDATED WITH SOLUTION): <asp:ListView ID="lv" runat="server" OnItemDataBound="lv_ItemDataBound" > <LayoutTemplate> <!-- Product Category Stuff --> <asp:PlaceHol...

Inserting with asp:ListView inside asp:FormView

I have a asp:listview which uses the SelectedValue of the FormView. I have editing working with the listview fine, and insert will insert a record but it doesnt insert the SelectedValue of the parent FormView... What am I missing? ...

Insert record with EmptyDataTemplate in asp:ListView

I have an EmptyDataTemplate in my asp:ListView which I want to use to insert a new record. I have Inserting working in the InsertItemTemplate... I thought I could copy the InsertItemTemplate into the EmptyDataTemplate, on clicking Insert this gives the error Insert can only be called on an insert item. Ensure only the InsertTemplate h...

Canceling SelectedIndexChanged in WinForm ListView

The winform ListView doesn't seem to have an easy way to cancel the SelectedIndexChanged event. I don't see a SelectedIndexChanging event either. The code is my attempt. However the hightlight is gone and I was wondering if I need to color the selection also or if there's a better way to cancel. _prevSelectedIndex is the index from the ...

How to draw a bmp/icon on a TListView subitem in Delphi?

I would like to draw an icon/bmp into a subitem of a TListView using delphi. But I don't know how to accomplish that. It works fine for the first item on the list, but having problems with the subitems. ...

A beginners Entity Framework query to populate a WinForms ListView.

I've just started learning how to use the Entity Framework to write a very simple C# network monitoring program - this is a learning exercise to try and "drive home" what I've only read about to date. I'm also new to C# and LINQ (just to complicate things further.) I believe I have the data model suitably normalised but I may be wrong. ...

WPF Treeview with fixed width columns

I want to create a mix of a treeview and a listview. I want to have 2 columns. In the left column i want a recursive treeview and the right column should show some info about the items from the left column. Let's call the left column Name and the right column Value. The problem is that when you expand a treeview the indentation level cha...

dynamically nest DataTemplates in ListView

I have an object of Type MyTypeOneViewModel that is displayed in the first column of ListView and I have an object of Type MyTypeTwoViewModel that is displayed in the 2nd column of my ListView. Both types have a property of type MyNestedViewModel. Now I would like to display a different DataTemplate for each cell in the ListView dependin...

Using ASP.Net ListView.ExtractItemValues, how do I get the selected item in a RadioButtonList in the ListViewDataItem?

I'm attempting to iterate over the ListViewDataItems in an ASP.Net ListView, and use the ListView.ExtractItemValues to get the values from DataBoundControls. This works fine with ITextControls, but I am having difficulty getting the Selected Item from a RadioButtonList. Here is my markup: <asp:ListView ID="lvQuiz" runat="server"> <Lay...

SharePoint - Web part to view remote list

Which web part and how to configure it to view a list from a different site collection? Please note that I do not want to view a page but a list. For example view Announcements from a different team site under a seperate site collection. Thank you in advance for your help. ...

Windows Forms ListView missing horizontal scrollbar

I have a Windows Forms ListView in a form (C#, VS 2005) and have it anchored to all the edges of the form so that it entirely fills the form excluding the status bar. The ListView is in detail mode and the columns are very wide - definitely wider than the display area. I have a vertical scrollbar but no horizontal scrollbar. I can scr...

WPF ListView: Attaching a double-click (on an item) event

I have the following ListView: <ListView Name="TrackListView"> <ListView.View> <GridView> <GridViewColumn Header="Title" Width="100" HeaderTemplate="{StaticResource BlueHeader}" DisplayMemberBinding="{Binding Name}"/> <GridViewColumn Header="Artist" Width="100" HeaderTemplate="{StaticResource BlueHead...

ListView DisplayMemberBinding vs. DataTemplate

Can I use DisplayMemberBinding and still be able to define a DataTemplate for the Datatype of that column. As soon as I set the DisplayMemberBinding for a column that column ony can display simple text. But I don't want text :) But if I use Celltemplate all cells of that column use the same DataTemplate. But I don't want the same templat...