TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > C#(C Sharp)

Notices

Reply
 
Thread Tools Display Modes
Old 26-11-2007, 11:31 PM   #1
csharpula csharp
Guest
 
Posts: n/a
Data Binding

Hello,
I am trying to do data binding with c# Binding - trying to bind
list<object> to a list view. Is there any code example for doing that?
Thank you!

*** Sent via Developersdex http://www.developersdex.com ***
  Reply With Quote
Old 26-11-2007, 11:31 PM   #2
Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
Re: Data Binding

The ListView class in C# does not support data binding. The one in WPF
offers data binding, I believe.

If you want to populate items from a data source to the ListView in
Windows Forms, then you have to populate it manually.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"csharpula csharp" <csharpula@yahoo.com> wrote in message
news:%23%23bwCQFMIHA.4808@TK2MSFTNGP05.phx.gbl...
> Hello,
> I am trying to do data binding with c# Binding - trying to bind
> list<object> to a list view. Is there any code example for doing that?
> Thank you!
>
> *** Sent via Developersdex http://www.developersdex.com ***



  Reply With Quote
Old 27-11-2007, 02:28 PM   #3
csharpula csharp
Guest
 
Posts: n/a
Re: Data Binding

What about ListBox or any other control that can present list (also can
sort it) and to provide binding of data?


*** Sent via Developersdex http://www.developersdex.com ***
  Reply With Quote
Old 27-11-2007, 10:30 PM   #4
Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
Re: Data Binding

You can use the ListBox, yes. You would have to set the DataSource (and
possibly DataMember) properties to the data source.

If you are using a DataTable as the source, then I recommend you create
a DataView on the DataTable and then sort that, and bind the ListBox to the
DataView.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"csharpula csharp" <csharpula@yahoo.com> wrote in message
news:uty2MuMMIHA.2268@TK2MSFTNGP02.phx.gbl...
> What about ListBox or any other control that can present list (also can
> sort it) and to provide binding of data?
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



  Reply With Quote
Reply

Thread Tools
Display Modes




New To Site? Need Help?

All times are GMT +5.5. The time now is 07:38 PM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional