473,569 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding to a listview

anyone know how to bind a collection of objects to a listview as with the
datagrid or listbox control.

for example the listbox control binds to collection objects as follows.

lst.DataSource = Regions
lst.DisplayMemb er = "Country"

is there a way of doing the same with a listview.

Thank you
Nov 21 '05 #1
1 1021
Anthony,
anyone know how to bind a collection of objects to a listview as with the
datagrid or listbox control.

for example the listbox control binds to collection objects as follows.

lst.DataSource = Regions
lst.DisplayMemb er = "Country"

is there a way of doing the same with a listview.

For this is an easy answer No, for that is the datagrid.

Cor
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2013
by: Bom | last post by:
Hi, I bound a dataset to a listview (I used example of Lothka). I have also a button delete. When I select a row in the listview and I push delete-button I can delete the row in the dataset as follows : ds.Tables.Rows.delete(). And then I rebind my listview to the dataset. But working with item.index is not right.
1
2479
by: Peter | last post by:
Hello Thanks for reviewing my question. I noticed that the ListView properties do not offer any Data Binding option. Did Microsoft forget this Many Thank Peter
0
1342
by: alan | last post by:
Dear all, I'm trying to do a data binding for a ListView and I rewrite the code from some example but there is a error while I execute. Can anybody tell me what's wrong with it?? Thank you!! Alan Error message is
3
3775
by: alan | last post by:
What I would like to do is like that, a ListView data binding with a dataset which list all records of a table( for example the table list all the information of a student student_id, name, tel....etc). Besides, there are some textbox will display the student information when I click on one of the record on the ListView so that I can update...
4
17090
by: Lasse Eskildsen | last post by:
Hi, Is there an easy way to load the content of a dataset into a listview with a few columns? Thanks! -- Lasse
4
2042
by: emzyme20 | last post by:
Hi, I am trying to populate a list control that is bound to a data table but the display member needs to come from a different data table. I have two list controls in C#, one displaying available categories and one displaying selected categories. In the database these are represented in two tables, the available category table has an ID...
0
2489
by: JB | last post by:
Hi All, I was wondering if there was an easy and straightforward way to bind elements in a ListView control, with the corresponding elements in a List or Dictionary. Ideally I'd like a seamless(ish) bi-directional refreshing capabilities between the ListView elements and the List or Dictionary (e.g. if I change an element name in the...
1
9810
by: Monty M. | last post by:
Does anyone know how to perform two way data binding between a combo box and a listview. The listview is bound to a dataset table in code: Binding Bind = new Binding(); DataTable dt; Field_LV.DataContext = dt; Field_LV.SetBinding(ListView.ItemsSourceProperty, Bind);
3
454
by: csharpula csharp | last post by:
Hello, I am trying to do data binding with c# Binding - trying to bind list<objectto a list view. Is there any code example for doing that? Thank you! *** Sent via Developersdex http://www.developersdex.com ***
0
1158
by: Andy | last post by:
Hi, I have the following Xaml.. I'm not sure why I can't get the context menu item's to bind to a property of the window. Any ideas? Thanks Andy <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.