listview

C# WPF OnPropertyChanged Within a foreach loop

I have been trying to learn and take advantage of WPF and databinding. I have a listview that has a column that will display one of three images as shown in this snippet: <GridViewColumn Header="Status" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <Image x:Name="TheImage" Height="18"/> <DataTemplate.Trig...

ASP.NET display ListView InsertITemtemplate on button click

Hi all, I want to display the ListView InsertITemtemplate on button click (i.e. not to be displayed by default) but couldn't manage to do it. I have tried InsertItemPosition.None but then it does not display on button click as well. I am sure it must be a very simple thing but I am running out of time for this task. Any help would be gr...

C#/.NET - How to trigger update of listview from another thread

It seems I'm forbidden to access (i.e. update) my list view control from another thread than the main thread. How can I perform some threaded task and then signal somehow to start the update of the listview? ...

How can I "set View" in right place where I remove an item in ListView (Android)

I choose an item to remove from my ListView. And after the Item was removed, my ListView was scrolled back and display at the first Item. I want my ListView display in right place where the Item I had removed (It like remove a contact in Android Contact list). How can I do that? ...

Listview edit item

hello I have trouble with editing listview (asp.net 3.5 server control). I want to accomplish following task. When click on edit button in my listview I want to open dialog window where I can edit user information. The dialog is standard jquery dialog. Issue I have is when I click on edit button, the edit button fires postback. Is th...

Why do ListBox.ObjectCollection and ListView.ListViewItemCollection have AddRange but not InsertRange or RemoveRange?

So, both ListBox.ObjectCollection and ListView.ListViewItemCollection implement the IList class, which provides Add and Remove methods but no AddRange, InsertRange, or RemoveRange. However, ListBox.ObjectCollection and ListView.ListViewItemCollection also provide an AddRange method -- just no InsertRange or RemoveRange. Look at the Arra...

ASP .NET - Use asp:ListBox in ListView

In a ASP .NET 3.5 ListView InsertItemTemplate I would like to change a textbox: <asp:TextBox ID="txt" runat="server" Text='<%# Bind("plant") %>' /> to a ListBox: <asp:ListBox ID="list" runat="server" DataValueField='<%# Bind("plant") %>' > How do I bind the field 'plant' to the listbox? UPDATE 1 Here is a sample of using a combob...

WPF: Bind ListView with Multiple Sources

Calling all WPF experts! I'm converting an application I made to create characters for a particular RPG from Window Forms to WPF. For the most part, the program is much simpler in its WPF form; however, I can't seem to figure this part out for the life of me. I have a database that contains a list of skills that the character can take....

How to display list of images in ListView in android?

Hi All, I am new to android. I want to display the list of images using the ListView. The images which are displayed are decided at runtime according to server response. and also i want to embedd some text on this image(like match scoring chip). the number of images are not fix. Can anybody help me here? ...

Listview/DetailsView: Hide a null field

I imagine this is quite a common problem, but as yet I haven't found an elegant solution. I have a number of instances where I have either a ListView or a DetailsView control that is bound to a SQL Server SProc. The problem I have is that there are numerous instances where, when a column is Null, I want to display something different in...

How can I take a screenshot of a Winforms control/form in C#?

I have a listview control that is on a winforms form. It fills the full screen but there are more items there than the screen can show. How can I take a screenshot of the whole control as if I could display the whole contents of the listview on screen? So if the whole listview takes 1000 x 4000 pixels, then I want an image/bitmap of tha...

Possible to have subsonic and linq in same project?

Am using SS 2.2 and am running into issues with a listview and implementing paging / sorting etc. Can't work with SS3 anyone know if I'm asking for trouble by having both in the one project? ...

WPF - GridView.GridViewColumn two lines per row?

Hello is it possible to have a ListView -> ListView.View -> GridView -> GridViewColumn with "two rows" per row. eg.             COLUMN 1 | COLUMN 2 ROW 1 blah          | data             blah ROW 2 etc            | more I have tried unsuccessfully to use a Cell template but the item inside the template doesn't resize when its ...

.net listview find if atleast one radiobox selected in eah row

Hi, i have a listview with 2 or more radio button controls in each row of it and i want to findout if atleast one radiobutton selected on submit. for example ROW 1 Quetison 1 radiobutton1 radiobutton2 radiobutton3 ROW 2 Quetison 2 radiobutton1 radiobutton2 radiobutton3 on submit i want to find...

Android layout centering in RelativeLayout for custom ListView

I'm really pulling my hair out over this one. Some background. I have a list of items that all have checkboxes next to them. When you deselect a checkbox, a button appears that allows you to delete the item from the list. This seems backwards at first but we only want "selected" items to be eligible for further processing, etc. This is m...

GridView dynamic column width in WPF

<Window x:Class="GridViewSample.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" > <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <ListView Name="CheckoutList" Margin="0,0,8,0"> <ListView.View> ...

Bind List of object array to ListView in ASP.NET

Hi All, I am breaking my head to fix an issue. I have a method that returns a List<object[]>. Each object[] in the List contains the following: object[0]=Id; object[1]=Name; Now I am looking for a way to bind this List to a ListView in a custom ItemTemplate which would look as follows: <asp:Label runat="server" ID="lblId" Text=...

Android: Binding data from a database to a CheckBox in a ListView?

I'm trying to bind data from my SQLiteDatabase to a ListView. I'm currently using a SimpleCursorAdapter to fill in my ListView. Unfortunately this doesn't seem to work with setting a CheckBox's checked attribute. This is how I do it now; instead of changing the CheckBox's checked status the adapter is filling in the value to the text ar...

C# How to set label text in a listview?

In my codebehind I want the set the text of a label. Here is the aspx code: <asp:ListView ID="lstRegistrations" runat="server"> <LayoutTemplate> <table cellspacing="0" cellpadding="0" border="0"> <tr> <th width="80" align="left"> <asp:Label ID="lblDate" runat="server" Text="<%=...

Why isn't this code finding my textbox in my ListView?

I have a listview with an EditTemplate. If I have one item in the listview, the following code throws a null exception: if((TextBox)this.lvwColors.EditItem.FindControl("txtColor")) != null) { this.Color = ((TextBox)this.lvwColors.EditItem.FindControl("txtColor")).Text.Trim(); } It does not throw an error if I have two items...